diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 33555495436..6e4b48e40aa 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -3582,6 +3582,8 @@ void ThemeEditor::_remove_preview_tab(int p_tab) { } preview_tabs_content->remove_child(preview_tab); + preview_tab->queue_free(); + preview_tabs->remove_tab(p_tab); _change_preview_tab(preview_tabs->get_current_tab()); }