Destroy GTK tool bar widget if it was never attached (bug#75636)

* src/gtkutil.c (xg_free_frame_widgets): Call gtk_widget_destroy on an
unpacked toolbar widget.
This commit is contained in:
Pip Cet 2025-01-22 00:51:33 +00:00
parent cdcfffd50a
commit 6ea1e03fe7

View file

@ -1884,6 +1884,12 @@ xg_free_frame_widgets (struct frame *f)
if (tbinfo)
xfree (tbinfo);
if (x->toolbar_widget && !x->toolbar_is_packed)
{
gtk_widget_destroy (x->toolbar_widget);
x->toolbar_widget = NULL;
}
/* x_free_frame_resources should have taken care of it */
#ifndef HAVE_PGTK
#ifdef HAVE_XDBE