From 0ec2b7baea235c3c5cf43ab296b40c06982b32de Mon Sep 17 00:00:00 2001 From: George Marques Date: Wed, 21 Sep 2016 19:17:55 -0300 Subject: Fix crash when disabling main screen plugin --- tools/editor/editor_node.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/editor') diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 1ee0b93114..fe97fe2881 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -3018,6 +3018,10 @@ void EditorNode::remove_editor_plugin(EditorPlugin *p_editor) { if (p_editor->get_name()==singleton->main_editor_buttons[i]->get_text()) { + if (singleton->main_editor_buttons[i]->is_pressed()) { + singleton->_editor_select(EDITOR_SCRIPT); + } + memdelete( singleton->main_editor_buttons[i] ); singleton->main_editor_buttons.remove(i); -- cgit v1.2.3