summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index 5880c69763..64fb8ee9c7 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -1728,7 +1728,7 @@ void NativeScriptLanguage::unregister_script(NativeScript *script) {
library_script_users.erase(S);
Map<String, Ref<GDNative>>::Element *G = library_gdnatives.find(script->lib_path);
- if (G) {
+ if (G && G->get()->get_library()->is_reloadable()) {
G->get()->terminate();
library_gdnatives.erase(G);
}