summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-04-05 10:07:59 +0200
committerGitHub <noreply@github.com>2021-04-05 10:07:59 +0200
commit07d26edafcbe4581e62480e199b8825d1c7e630c (patch)
tree13f440414f70aed9bee7ff2cf13cb859af3c1f82
parenta864a703ee27065795c6297aaeb72ed753d0f279 (diff)
parent0fe851da23050c28e85ba4165b24d603c8c3b382 (diff)
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
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index 5d2117d76c..2a3202c0b8 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -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);