Fix crash when disabling main screen plugin
This commit is contained in:
parent
2f776af2e6
commit
0ec2b7baea
1 changed files with 4 additions and 0 deletions
|
@ -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 (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] );
|
memdelete( singleton->main_editor_buttons[i] );
|
||||||
singleton->main_editor_buttons.remove(i);
|
singleton->main_editor_buttons.remove(i);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue