Merge pull request #39423 from Phischermen/fix-new-text-file-crash

Fix crash when creating new text file with no name
This commit is contained in:
Rémi Verschelde 2020-06-10 10:43:23 +02:00 committed by GitHub
commit 7c48155bbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -837,7 +837,6 @@ void ScriptEditor::_file_dialog_action(String p_file) {
Error err;
FileAccess *file = FileAccess::open(p_file, FileAccess::WRITE, &err);
if (err) {
memdelete(file);
editor->show_warning(TTR("Error writing TextFile:") + "\n" + p_file, TTR("Error!"));
break;
}