diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp index 99bb2d45256..9ffbe0dbd2c 100644 --- a/modules/gdnative/nativescript/nativescript.cpp +++ b/modules/gdnative/nativescript/nativescript.cpp @@ -1534,6 +1534,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 >::Element *G = library_gdnatives.find(script->lib_path);