summaryrefslogtreecommitdiff
path: root/editor/editor_dir_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_dir_dialog.cpp')
-rw-r--r--editor/editor_dir_dialog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/editor_dir_dialog.cpp b/editor/editor_dir_dialog.cpp
index 0636ae3aea..525c5aa62d 100644
--- a/editor/editor_dir_dialog.cpp
+++ b/editor/editor_dir_dialog.cpp
@@ -95,7 +95,9 @@ void EditorDirDialog::_notification(int p_what) {
}
if (p_what == NOTIFICATION_EXIT_TREE) {
- EditorFileSystem::get_singleton()->disconnect("filesystem_changed", this, "reload");
+ if (EditorFileSystem::get_singleton()->is_connected("filesystem_changed", this, "reload")) {
+ EditorFileSystem::get_singleton()->disconnect("filesystem_changed", this, "reload");
+ }
}
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {