From cdb29447b4da77bebc7adc944fe10ef7ea580ebf Mon Sep 17 00:00:00 2001 From: Phischermen Date: Tue, 9 Jun 2020 12:59:59 -0700 Subject: [PATCH] Fix crash when creating new text file with no name --- editor/plugins/script_editor_plugin.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 8d6dac3907e..48a9febcf91 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -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; }