summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-02-14 12:17:14 +0100
committerGitHub <noreply@github.com>2021-02-14 12:17:14 +0100
commitb9aa2d0dfb5ec6e93e1dc3604fba92606c1a2398 (patch)
treefba9b368e74da07dfb682d5bbd8725467f11eaf2 /modules
parent4eae532921bcf9a44398cebf3b54f2a0890762c6 (diff)
parentae7675065a3eebf2a61a5bdc5b5e103a7f869a78 (diff)
Merge pull request #45953 from BastiaanOlij/no_unload_non_reloadable
Only unload the library if the reloadable flag is true
Diffstat (limited to 'modules')
-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);
}