From 5e3229b7ed1c9a1a0eeb9db5b0e8b2fc9a8d438d Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Wed, 27 Sep 2023 15:29:20 +0200 Subject: [PATCH] Fix leak when closing theme editor preview tabs --- editor/plugins/theme_editor_plugin.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 3ac1c0d559d8..821d8151a4a5 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -3583,6 +3583,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()); }