summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-02-25 20:07:39 +0100
committerGitHub <noreply@github.com>2019-02-25 20:07:39 +0100
commit8930347c48f4bc961746ec7ebe168ed013e07a28 (patch)
tree24ad9ed1f99a0c8a534a2e48492b3e8ef7b10003 /editor
parentbaefda668670f5be056f2cdfe7806a32c04eac9c (diff)
parent747b9ac8702c30bb6d5aa87b5470bd58a3a26f94 (diff)
Merge pull request #26279 from ericrybick/master
Fix Editor crash after disabling plugin that used "forward_spatial_gui_input" #26124
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_node.cpp5
-rw-r--r--editor/editor_node.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 8c9974404e..9d9c5b6cc8 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -2542,6 +2542,7 @@ void EditorNode::remove_editor_plugin(EditorPlugin *p_editor, bool p_config_chan
singleton->editor_plugins_over->get_plugins_list().erase(p_editor);
singleton->remove_child(p_editor);
singleton->editor_data.remove_editor_plugin(p_editor);
+ singleton->get_editor_plugins_force_input_forwarding()->remove_plugin(p_editor);
}
void EditorNode::_update_addon_config() {
@@ -6059,6 +6060,10 @@ void EditorPluginList::add_plugin(EditorPlugin *p_plugin) {
plugins_list.push_back(p_plugin);
}
+void EditorPluginList::remove_plugin(EditorPlugin *p_plugin) {
+ plugins_list.erase(p_plugin);
+}
+
bool EditorPluginList::empty() {
return plugins_list.empty();
}
diff --git a/editor/editor_node.h b/editor/editor_node.h
index 46a65b56fa..433441c29e 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -837,6 +837,7 @@ public:
void forward_spatial_draw_over_viewport(Control *p_overlay);
void forward_spatial_force_draw_over_viewport(Control *p_overlay);
void add_plugin(EditorPlugin *p_plugin);
+ void remove_plugin(EditorPlugin *p_plugin);
void clear();
bool empty();