Fix crash when creating new text file with no name
(cherry picked from commit cdb29447b4
)
This commit is contained in:
parent
3202df9b5c
commit
12786bcbdb
|
@ -902,7 +902,6 @@ void ScriptEditor::_file_dialog_action(String p_file) {
|
||||||
Error err;
|
Error err;
|
||||||
FileAccess *file = FileAccess::open(p_file, FileAccess::WRITE, &err);
|
FileAccess *file = FileAccess::open(p_file, FileAccess::WRITE, &err);
|
||||||
if (err) {
|
if (err) {
|
||||||
memdelete(file);
|
|
||||||
editor->show_warning(TTR("Error writing TextFile:") + "\n" + p_file, TTR("Error!"));
|
editor->show_warning(TTR("Error writing TextFile:") + "\n" + p_file, TTR("Error!"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue