[gtk/wip/baedert/for-master: 33/36] headerbar: Replace gtk_widget_destroy() call



commit 32ade17fdb0fbf6514c2b5e4df1a786b328c5c6b
Author: Timm Bäder <mail baedert org>
Date:   Fri Feb 21 13:04:44 2020 +0100

    headerbar: Replace gtk_widget_destroy() call

 gtk/gtkheaderbar.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
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;
                     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]