Browse Source

Merge pull request #91396 from Daylily-Zeleen/daylily-zeleen/fix_disable_main_screen_plugin_crash

Fix crash when switching main screen from a disabled plugin main screen if code editor is floating.
Rémi Verschelde 1 year ago
parent
commit
b297e97abf
1 changed files with 4 additions and 0 deletions
  1. 4 0
      editor/editor_node.cpp

+ 4 - 0
editor/editor_node.cpp

@@ -3486,6 +3486,10 @@ void EditorNode::remove_editor_plugin(EditorPlugin *p_editor, bool p_config_chan
 			}
 		}
 
+		if (singleton->editor_plugin_screen == p_editor) {
+			singleton->editor_plugin_screen = nullptr;
+		}
+
 		singleton->editor_table.erase(p_editor);
 	}
 	p_editor->make_visible(false);