浏览代码

Merge pull request #84218 from SaracenOne/naming_conflict_crash

Fix crash on rename collision in thumbnail grid
Rémi Verschelde 1 年之前
父节点
当前提交
6271f91a8f
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      editor/filesystem_dock.cpp

+ 3 - 1
editor/filesystem_dock.cpp

@@ -1790,7 +1790,9 @@ void FileSystemDock::_rename_operation_confirm() {
 	}
 	if (new_exist) {
 		EditorNode::get_singleton()->show_warning(TTR("A file or folder with this name already exists."));
-		ti->set_text(col_index, old_name);
+		if (ti) {
+			ti->set_text(col_index, old_name);
+		}
 		return;
 	}