diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-11-16 17:26:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-16 17:26:55 +0100 |
commit | 0807e4f348299eaf2a8c97d8bc9ba66c0f501ee7 (patch) | |
tree | 102bc936ce26718ae17ba1b225510b3c75d7adb9 | |
parent | 3863faf05bc025318d98b3f1906b56ef4d2deaff (diff) | |
parent | 911d3a458686a4dbe5bdb302fc25768f46204283 (diff) |
Merge pull request #23746 from DrNochi/bug/issue-#23332
Prevent "Property not found: ..." warning when creating/importing a project
-rw-r--r-- | editor/editor_data.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 9420452da1..bd6ce797b5 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -946,16 +946,18 @@ void EditorData::script_class_save_icon_paths() { void EditorData::script_class_load_icon_paths() { script_class_clear_icon_paths(); - Dictionary d = ProjectSettings::get_singleton()->get("_global_script_class_icons"); - List<Variant> keys; - d.get_key_list(&keys); + if (ProjectSettings::get_singleton()->has_setting("_global_script_class_icons")) { + Dictionary d = ProjectSettings::get_singleton()->get("_global_script_class_icons"); + List<Variant> keys; + d.get_key_list(&keys); - for (List<Variant>::Element *E = keys.front(); E; E = E->next()) { - String name = E->get().operator String(); - _script_class_icon_paths[name] = d[name]; + for (List<Variant>::Element *E = keys.front(); E; E = E->next()) { + String name = E->get().operator String(); + _script_class_icon_paths[name] = d[name]; - String path = ScriptServer::get_global_class_path(name); - script_class_set_name(path, name); + String path = ScriptServer::get_global_class_path(name); + script_class_set_name(path, name); + } } } |