diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 672a797d667..3014c17a40e 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3371,6 +3371,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); @@ -4018,7 +4021,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