diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c index 1a81f327bc..ca56f4fba1 100644 --- a/gtk/gtkheaderbar.c +++ b/gtk/gtkheaderbar.c @@ -386,7 +386,8 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar) if (!_gtk_header_bar_update_window_icon (bar, window)) { - gtk_widget_destroy (button); + g_object_ref_sink (button); + g_object_unref (button); priv->titlebar_icon = NULL; button = NULL; }