summaryrefslogtreecommitdiff
path: root/core/script_language.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/script_language.cpp')
-rw-r--r--core/script_language.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/script_language.cpp b/core/script_language.cpp
index bb2e9a07ff..d535c54dea 100644
--- a/core/script_language.cpp
+++ b/core/script_language.cpp
@@ -276,7 +276,9 @@ void ScriptServer::save_global_classes() {
}
if (gcarr.empty()) {
- ProjectSettings::get_singleton()->clear("_global_script_classes");
+ if (ProjectSettings::get_singleton()->has_setting("_global_script_classes")) {
+ ProjectSettings::get_singleton()->clear("_global_script_classes");
+ }
} else {
ProjectSettings::get_singleton()->set("_global_script_classes", gcarr);
}