summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-10-29 12:01:01 +0100
committerGitHub <noreply@github.com>2019-10-29 12:01:01 +0100
commit0641acc576c138f592771c0cd3b0e7dc8212d1ae (patch)
tree51aab4e2dfd5ba8c49cd5e7ed25e6caee9a8544e /editor
parentf480d1c3b738d0f5be57fc35cc7f67743d5afa01 (diff)
parenta245bab78d70cdcfd6651a9a973abbaadda4994c (diff)
Merge pull request #33147 from mikkac/33135
Fixed disconnecting not connected signal
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_dir_dialog.cpp4
-rw-r--r--editor/plugins/version_control_editor_plugin.cpp5
2 files changed, 6 insertions, 3 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) {
diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp
index d4f985e1de..66b16b82a0 100644
--- a/editor/plugins/version_control_editor_plugin.cpp
+++ b/editor/plugins/version_control_editor_plugin.cpp
@@ -397,8 +397,9 @@ void VersionControlEditorPlugin::clear_stage_area() {
void VersionControlEditorPlugin::shut_down() {
if (EditorVCSInterface::get_singleton()) {
-
- EditorFileSystem::get_singleton()->disconnect("filesystem_changed", this, "_refresh_stage_area");
+ if (EditorFileSystem::get_singleton()->is_connected("filesystem_changed", this, "_refresh_stage_area")) {
+ EditorFileSystem::get_singleton()->disconnect("filesystem_changed", this, "_refresh_stage_area");
+ }
EditorVCSInterface::get_singleton()->shut_down();
memdelete(EditorVCSInterface::get_singleton());
EditorVCSInterface::set_singleton(NULL);