Explorar o código

Merge pull request #31569 from SaracenOne/plugin_shutdown_fix

Fix an exception when trying to close down editor with plugins using autoload singletons
Rémi Verschelde %!s(int64=6) %!d(string=hai) anos
pai
achega
739cbf45c3
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      editor/editor_autoload_settings.cpp

+ 2 - 2
editor/editor_autoload_settings.cpp

@@ -439,11 +439,11 @@ void EditorAutoloadSettings::update_autoload() {
 		}
 		if (info.in_editor) {
 			ERR_CONTINUE(!info.node);
-			get_tree()->get_root()->remove_child(info.node);
+			get_tree()->get_root()->call_deferred("remove_child", info.node);
 		}
 
 		if (info.node) {
-			memdelete(info.node);
+			info.node->queue_delete();
 			info.node = NULL;
 		}
 	}