summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Chabora <kobewi4e@gmail.com>2019-11-29 21:10:20 +0100
committerTomasz Chabora <kobewi4e@gmail.com>2019-11-29 21:10:20 +0100
commitf4a1a79d015bce39e54b2a7193fc02592c5569d1 (patch)
tree5a9f9667111185951e2b6aa0fb1a625173868adc
parent1b40a95b6f34d4024c732ef68b3ba96e4bd6e6f1 (diff)
Don't try to initialize empty NativeLibrary
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index 7c313c983f..768b12baea 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -119,7 +119,10 @@ String NativeScript::get_class_name() const {
void NativeScript::set_library(Ref<GDNativeLibrary> p_library) {
if (!library.is_null()) {
- WARN_PRINT("library on NativeScript already set. Do nothing.");
+ WARN_PRINT("Library in NativeScript already set. Do nothing.");
+ return;
+ }
+ if (p_library.is_null()) {
return;
}
library = p_library;