summaryrefslogtreecommitdiffstats
path: root/editor/filesystem_dock.cpp
diff options
context:
space:
mode:
authorSaracen <SaracenOne@gmail.com>2023-10-30 22:52:12 +0000
committerSaracen <SaracenOne@gmail.com>2023-10-30 22:52:12 +0000
commitc640018b88e614ac863d2b88ca8530207388e26f (patch)
treefc72ea4a302e737fac65c1c60927e94759bc42a9 /editor/filesystem_dock.cpp
parent5dc10b5aa506c4287c6ff87367efe031bc1a7d82 (diff)
downloadredot-engine-c640018b88e614ac863d2b88ca8530207388e26f.tar.gz
Fix crash on rename collision in thumbnail grid
Diffstat (limited to 'editor/filesystem_dock.cpp')
-rw-r--r--editor/filesystem_dock.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index ea043b42d1..0aa8ef66e7 100644
--- a/editor/filesystem_dock.cpp
+++ b/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;
}