mirror of
https://github.com/godotengine/godot.git
synced 2025-01-18 20:40:57 +08:00
Remove added pluginscript resource format loaders and savers on cleanup
Properly release added resource loader and save references. Otherwise PluginScript API may cause "ObjectDB Instances still exist!" warnings and segmentation faults on exit.
This commit is contained in:
parent
c317a3ce16
commit
5d88f74677
@ -114,6 +114,8 @@ void unregister_pluginscript_types() {
|
||||
for (List<PluginScriptLanguage *>::Element *e = pluginscript_languages.front(); e; e = e->next()) {
|
||||
PluginScriptLanguage *language = e->get();
|
||||
ScriptServer::unregister_language(language);
|
||||
ResourceLoader::remove_resource_format_loader(language->get_resource_loader());
|
||||
ResourceSaver::remove_resource_format_saver(language->get_resource_saver());
|
||||
memdelete(language);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user