Skip to content

Commit

Permalink
Merge pull request #72452 from akien-mga/global_class_always_create
Browse files Browse the repository at this point in the history
Always create global class list, even if empty
  • Loading branch information
akien-mga committed Jan 31, 2023
2 parents 925784d + 38a806e commit 8612c12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/config/project_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ Array ProjectSettings::get_global_class_list() {
Ref<ConfigFile> cf;
cf.instantiate();
if (cf->load(get_global_class_list_path()) == OK) {
script_classes = cf->get_value("", "list");
script_classes = cf->get_value("", "list", Array());
} else {
#ifndef TOOLS_ENABLED
// Script classes can't be recreated in exported project, so print an error.
Expand Down
2 changes: 1 addition & 1 deletion editor/editor_file_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1593,7 +1593,7 @@ void EditorFileSystem::_update_pending_script_classes() {
_update_script_classes();
} else {
// In case the class cache file was removed somehow, regenerate it.
if (ScriptServer::has_global_classes() && !FileAccess::exists(ScriptServer::get_global_class_cache_file_path())) {
if (!FileAccess::exists(ScriptServer::get_global_class_cache_file_path())) {
ScriptServer::save_global_classes();
}
}
Expand Down

0 comments on commit 8612c12

Please sign in to comment.