diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2016-09-22 12:10:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-22 12:10:23 +0200 |
commit | a63167459c6972f3750bf22799897a711e7556ba (patch) | |
tree | acb99dab272126eb66501876a5e1f509a396789d /tools/editor | |
parent | 2f776af2e600639c8d214e19555f3452a558692f (diff) | |
parent | 0ec2b7baea235c3c5cf43ab296b40c06982b32de (diff) |
Merge pull request #6581 from vnen/fix-mainscreen-crash
Fix crash when disabling main screen plugin
Diffstat (limited to 'tools/editor')
-rw-r--r-- | tools/editor/editor_node.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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); |