Browse Source

Merge pull request #48781 from kleonc/plugin-force_draw_over-crash-fix

Fix crash after disabling plugin using set_force_draw_over_forwarding_enabled()
Rémi Verschelde 4 years ago
parent
commit
c6bef53727
1 changed files with 3 additions and 2 deletions
  1. 3 2
      editor/editor_node.cpp

+ 3 - 2
editor/editor_node.cpp

@@ -3093,10 +3093,11 @@ void EditorNode::remove_editor_plugin(EditorPlugin *p_editor, bool p_config_chan
 	if (p_config_changed) {
 		p_editor->disable_plugin();
 	}
-	singleton->editor_plugins_over->get_plugins_list().erase(p_editor);
+	singleton->editor_plugins_over->remove_plugin(p_editor);
+	singleton->editor_plugins_force_over->remove_plugin(p_editor);
+	singleton->editor_plugins_force_input_forwarding->remove_plugin(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() {