diff options
| author | Bernhard Liebl | 2018-01-08 19:47:47 +0100 |
|---|---|---|
| committer | Bernhard Liebl | 2018-01-08 19:47:47 +0100 |
| commit | 7e1b39245f96d425d5fb64cffef0c29e6c04deaa (patch) | |
| tree | 3870bc5b3114c083afce3fe43f2c7a70ff8bbbf2 /editor/plugins/script_editor_plugin.cpp | |
| parent | 37ca542d2bfd9aac296e82e30a76117090dea08e (diff) | |
| download | godot-7e1b39245f96d425d5fb64cffef0c29e6c04deaa.tar.gz godot-7e1b39245f96d425d5fb64cffef0c29e6c04deaa.tar.zst godot-7e1b39245f96d425d5fb64cffef0c29e6c04deaa.zip | |
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index bc986cee9..51954a24d 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -514,7 +514,6 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save) { if (p_save) { apply_scripts(); } - current->clear_edit_menu(); notify_script_close(current->get_edited_script()); } else { EditorHelp *help = Object::cast_to<EditorHelp>(tab_container->get_child(selected)); @@ -540,6 +539,9 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save) { } int idx = tab_container->get_current_tab(); + if (current) { + current->clear_edit_menu(); + } memdelete(tselected); if (idx >= tab_container->get_child_count()) idx = tab_container->get_child_count() - 1; |
