From f4a1a79d015bce39e54b2a7193fc02592c5569d1 Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Fri, 29 Nov 2019 21:10:20 +0100 Subject: Don't try to initialize empty NativeLibrary --- modules/gdnative/nativescript/nativescript.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/gdnative/nativescript') 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 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; -- cgit v1.2.3