You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Fix editor crash when editor settings resource is invalid
This commit is contained in:
@@ -1063,13 +1063,13 @@ void EditorSettings::create() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
singleton = ResourceLoader::load(config_file_path, "EditorSettings");
|
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()) {
|
if (singleton.is_null()) {
|
||||||
ERR_PRINT("Could not load editor settings from path: " + config_file_path);
|
ERR_PRINT("Could not load editor settings from path: " + config_file_path);
|
||||||
|
config_file_path = get_newest_settings_path();
|
||||||
goto fail;
|
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;
|
singleton->save_changed_setting = true;
|
||||||
|
|
||||||
print_verbose("EditorSettings: Load OK!");
|
print_verbose("EditorSettings: Load OK!");
|
||||||
|
|||||||
Reference in New Issue
Block a user