[gtk/wip/baedert/for-master: 11/11] stackswitcher: Avoid calling gtk_widget_destroy()



commit c647abd94b672f2082e384c0d32c090ed70d16e5
Author: Timm Bäder <mail baedert org>
Date:   Fri Feb 21 09:08:05 2020 +0100

    stackswitcher: Avoid calling gtk_widget_destroy()

 gtk/gtkstackswitcher.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkstackswitcher.c b/gtk/gtkstackswitcher.c
index 699904627f..7b786bffda 100644
--- a/gtk/gtkstackswitcher.c
+++ b/gtk/gtkstackswitcher.c
@@ -158,7 +158,7 @@ rebuild_child (GtkWidget   *self,
 
   button_child = gtk_bin_get_child (GTK_BIN (self));
   if (button_child != NULL)
-    gtk_widget_destroy (button_child);
+    gtk_container_remove (GTK_CONTAINER (self), button_child);
 
   button_child = NULL;
 


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