Merge pull request #23746 from DrNochi/bug/issue-#23332

Prevent "Property not found: ..." warning when creating/importing a project
This commit is contained in:
Rémi Verschelde 2018-11-16 17:26:55 +01:00 committed by GitHub
commit 0807e4f348
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 8 deletions

View File

@ -946,6 +946,7 @@ void EditorData::script_class_save_icon_paths() {
void EditorData::script_class_load_icon_paths() { void EditorData::script_class_load_icon_paths() {
script_class_clear_icon_paths(); script_class_clear_icon_paths();
if (ProjectSettings::get_singleton()->has_setting("_global_script_class_icons")) {
Dictionary d = ProjectSettings::get_singleton()->get("_global_script_class_icons"); Dictionary d = ProjectSettings::get_singleton()->get("_global_script_class_icons");
List<Variant> keys; List<Variant> keys;
d.get_key_list(&keys); d.get_key_list(&keys);
@ -957,6 +958,7 @@ void EditorData::script_class_load_icon_paths() {
String path = ScriptServer::get_global_class_path(name); String path = ScriptServer::get_global_class_path(name);
script_class_set_name(path, name); script_class_set_name(path, name);
} }
}
} }
EditorData::EditorData() { EditorData::EditorData() {