Merge pull request #31569 from SaracenOne/plugin_shutdown_fix

Fix an exception when trying to close down editor with plugins using autoload singletons
This commit is contained in:
Rémi Verschelde 2019-08-23 08:19:29 +02:00 committed by GitHub
commit 739cbf45c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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