Browse Source

Merge pull request #34002 from KoBeWi/crashonat

Don't try to initialize empty NativeLibrary
Rémi Verschelde 5 years ago
parent
commit
ea7f3037da
1 changed files with 4 additions and 1 deletions
  1. 4 1
      modules/gdnative/nativescript/nativescript.cpp

+ 4 - 1
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;