diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-12-01 11:53:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-01 11:53:19 +0100 |
commit | ea7f3037da441affca86f918209750a2c8a71cda (patch) | |
tree | 86d827c7d970d8beb324105cc6daa47b588c6dcb /modules/gdnative/nativescript | |
parent | 7140d766a2bdb56ad4e73e0a5107960ca8687040 (diff) | |
parent | f4a1a79d015bce39e54b2a7193fc02592c5569d1 (diff) |
Merge pull request #34002 from KoBeWi/crashonat
Don't try to initialize empty NativeLibrary
Diffstat (limited to 'modules/gdnative/nativescript')
-rw-r--r-- | modules/gdnative/nativescript/nativescript.cpp | 5 |
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; |