Fixed disconnecting not connected signal

This commit is contained in:
Mikolaj Kaczmarek 2019-10-29 00:40:36 +01:00
parent 7d710a745e
commit a245bab78d
5 changed files with 15 additions and 6 deletions

View file

@ -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);