From 12786bcbdbffbba0674bf1cb6b812911be745eb9 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 (cherry picked from commit cdb29447b4da77bebc7adc944fe10ef7ea580ebf) --- 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 c03f901e800..17b6f283db1 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -902,7 +902,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; }