Merge pull request #6581 from vnen/fix-mainscreen-crash

Fix crash when disabling main screen plugin
This commit is contained in:
Rémi Verschelde 2016-09-22 12:10:23 +02:00 committed by GitHub
commit a63167459c

View file

@ -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);