summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-10-05 22:09:27 +0200
committerGitHub <noreply@github.com>2020-10-05 22:09:27 +0200
commit9b4399a50991de84c65b0b5f02d3ebb66c80b970 (patch)
tree37df1d240291d55f927d5cc733afc6ece1ef4523 /editor
parent437e0be8112a81344fd9b2474644ab8cf0b60885 (diff)
parent1ca501d7d4e6810361c0809062b570ed4702d0c8 (diff)
Merge pull request #42580 from aaronfranke/has-clear
Check for global script class information before clearing it
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_data.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index 7537c86676..1002c4917b 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -937,7 +937,9 @@ void EditorData::script_class_save_icon_paths() {
}
if (d.empty()) {
- ProjectSettings::get_singleton()->clear("_global_script_class_icons");
+ if (ProjectSettings::get_singleton()->has_setting("_global_script_class_icons")) {
+ ProjectSettings::get_singleton()->clear("_global_script_class_icons");
+ }
} else {
ProjectSettings::get_singleton()->set("_global_script_class_icons", d);
}