summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-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;