Browse Source

Fix crash on rename collision in thumbnail grid

Saracen 1 year ago
parent
commit
c640018b88
1 changed files with 3 additions and 1 deletions
  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;
 	}