[gtk/wip/baedert/for-master: 3/11] popovermenu: Avoid a gtk_widget_destroy() call



commit c22ab981792919fcf2403f68593d0e6b760ee173
Author: Timm Bäder <mail baedert org>
Date:   Thu Feb 20 18:05:00 2020 +0100

    popovermenu: Avoid a gtk_widget_destroy() call

 gtk/gtkpopovermenu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkpopovermenu.c b/gtk/gtkpopovermenu.c
index bf56b4c5be..3874e6f4ff 100644
--- a/gtk/gtkpopovermenu.c
+++ b/gtk/gtkpopovermenu.c
@@ -617,7 +617,7 @@ gtk_popover_menu_set_menu_model (GtkPopoverMenu *popover,
 
       stack = gtk_bin_get_child (GTK_BIN (popover));
       while ((child = gtk_widget_get_first_child (stack)))
-        gtk_widget_destroy (child);
+        gtk_container_remove (GTK_CONTAINER (stack), child);
 
       if (model)
         gtk_menu_section_box_new_toplevel (popover, model, popover->flags);


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