Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix editor crash when editor settings resource is invalid #94593

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions editor/editor_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1063,13 +1063,13 @@ void EditorSettings::create() {
}

singleton = ResourceLoader::load(config_file_path, "EditorSettings");
singleton->set_path(get_newest_settings_path()); // Settings can be loaded from older version file, so make sure it's newest.

if (singleton.is_null()) {
ERR_PRINT("Could not load editor settings from path: " + config_file_path);
config_file_path = get_newest_settings_path();
goto fail;
}

singleton->set_path(get_newest_settings_path()); // Settings can be loaded from older version file, so make sure it's newest.
singleton->save_changed_setting = true;

print_verbose("EditorSettings: Load OK!");
Expand Down
Loading