From 5c133f5432c0f0bd8d6d853d42f89f18a2d31d30 Mon Sep 17 00:00:00 2001 From: Daylily-Zeleen Date: Wed, 1 May 2024 15:05:56 +0800 Subject: [PATCH] Fix crash when switching main screen from a disabled plugin main screen if code editor is floating. --- editor/editor_node.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index b9ac7b6d4269..7ae566dd2c0e 100644 --- a/editor/editor_node.cpp +++ b/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);