diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 31985481c..59fd6369e 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3244,6 +3244,9 @@ void EditorNode::_remove_edited_scene(bool p_change_tab) { } void EditorNode::_remove_scene(int index, bool p_change_tab) { + // Clear icon cache in case some scripts are no longer needed. + script_icon_cache.clear(); + if (editor_data.get_edited_scene() == index) { //Scene to remove is current scene _remove_edited_scene(p_change_tab); @@ -3889,7 +3892,7 @@ void EditorNode::_pick_main_scene_custom_action(const String &p_custom_action_na } } -Ref EditorNode::get_object_icon(const Object *p_object, const String &p_fallback) const { +Ref EditorNode::get_object_icon(const Object *p_object, const String &p_fallback) { ERR_FAIL_COND_V(!p_object || !gui_base, nullptr); Ref