From 1ca501d7d4e6810361c0809062b570ed4702d0c8 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Mon, 5 Oct 2020 15:45:54 -0400 Subject: Check for global script class information before clearing it --- editor/editor_data.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'editor') 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); } -- cgit v1.2.3