From b38a36923afc52a8f7470b59f92b8ad2c3021373 Mon Sep 17 00:00:00 2001 From: Kyle Date: Wed, 31 Mar 2021 15:00:31 -0400 Subject: [PATCH] Fix gdnative config file set as null Fixes #45997. Setting a GDNativeLibrary config file as null or any other object but a ConfigFile will now cause an error. (cherry picked from commit 618dd892f59be0f1d527da29b8cd904ad67bc915) --- modules/gdnative/gdnative.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp index 167e40b4e0fc..bc0d6e3c957f 100644 --- a/modules/gdnative/gdnative.cpp +++ b/modules/gdnative/gdnative.cpp @@ -148,6 +148,7 @@ void GDNativeLibrary::_get_property_list(List *p_list) const { } void GDNativeLibrary::set_config_file(Ref p_config_file) { + ERR_FAIL_COND(p_config_file.is_null()); set_singleton(p_config_file->get_value("general", "singleton", default_singleton)); set_load_once(p_config_file->get_value("general", "load_once", default_load_once));