Fixes leak with creating editor settings
This commit is contained in:
parent
9adf6d3441
commit
599ccbb7d4
|
@ -935,6 +935,7 @@ void EditorSettings::create() {
|
||||||
String config_file_name = "editor_settings-" + itos(VERSION_MAJOR) + ".tres";
|
String config_file_name = "editor_settings-" + itos(VERSION_MAJOR) + ".tres";
|
||||||
config_file_path = config_dir.plus_file(config_file_name);
|
config_file_path = config_dir.plus_file(config_file_name);
|
||||||
if (!dir->file_exists(config_file_name)) {
|
if (!dir->file_exists(config_file_name)) {
|
||||||
|
memdelete(dir);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue