From 5d88f746770ac46506fbb69b04993af47cef6c10 Mon Sep 17 00:00:00 2001 From: Ivan Hilaire Date: Fri, 19 Jul 2019 22:13:44 +0300 Subject: 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. --- modules/gdnative/pluginscript/register_types.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/gdnative/pluginscript') diff --git a/modules/gdnative/pluginscript/register_types.cpp b/modules/gdnative/pluginscript/register_types.cpp index b7ab887e11..3b46f33afb 100644 --- a/modules/gdnative/pluginscript/register_types.cpp +++ b/modules/gdnative/pluginscript/register_types.cpp @@ -114,6 +114,8 @@ void unregister_pluginscript_types() { for (List::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); } } -- cgit v1.2.3