summaryrefslogtreecommitdiffstats
path: root/modules/gdnative/register_types.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdnative/register_types.cpp')
-rw-r--r--modules/gdnative/register_types.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp
index d2a3e29849..87f9cddaa2 100644
--- a/modules/gdnative/register_types.cpp
+++ b/modules/gdnative/register_types.cpp
@@ -163,7 +163,10 @@ void register_gdnative_types() {
// run singletons
- Array singletons = ProjectSettings::get_singleton()->get("gdnative/singletons");
+ Array singletons = Array();
+ if (ProjectSettings::get_singleton()->has_setting("gdnative/singletons")) {
+ singletons = ProjectSettings::get_singleton()->get("gdnative/singletons");
+ }
singleton_gdnatives.resize(singletons.size());