Merge pull request #47623 from Bromeon/bugfix/gdnative-cleanup

Fix error in the console: `double free or corruption (!prev)` at exit of GDnative C++ application
This commit is contained in:
Rémi Verschelde 2021-04-05 10:07:59 +02:00 committed by GitHub
commit 07d26edafc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1759,6 +1759,8 @@ void NativeScriptLanguage::unregister_script(NativeScript *script) {
C->get().destroy_func.free_func(C->get().destroy_func.method_data);
}
}
library_classes.erase(script->lib_path);
}
Map<String, Ref<GDNative>>::Element *G = library_gdnatives.find(script->lib_path);