Skip to content

Commit

Permalink
Fix gdnative config file set as null
Browse files Browse the repository at this point in the history
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 618dd89)
  • Loading branch information
likeich authored and akien-mga committed Mar 31, 2021
1 parent 54f0d8c commit b38a369
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/gdnative/gdnative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ void GDNativeLibrary::_get_property_list(List<PropertyInfo> *p_list) const {
}

void GDNativeLibrary::set_config_file(Ref<ConfigFile> 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));
Expand Down

0 comments on commit b38a369

Please sign in to comment.