Prevent crash in specific situation of removing a plugin, fixes #5019

This commit is contained in:
Juan Linietsky 2016-06-11 20:51:44 -03:00
parent fea9511bc6
commit e8209b9c5c
1 changed files with 1 additions and 0 deletions

View File

@ -3089,6 +3089,7 @@ void EditorNode::set_addon_plugin_enabled(const String& p_addon,bool p_enabled)
if (!p_enabled) {
EditorPlugin *addon = plugin_addons[p_addon];
editor_data.remove_editor_plugin( addon );
memdelete(addon); //bye
plugin_addons.erase(p_addon);
_update_addon_config();