[libadwaita/wip/exalm/view-switcher-cleanups: 3/4] view-switcher-bar: Unset stack in dispose()




commit ab18ffb358a1744c616ee6fc90896c2b889ed45f
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Nov 3 15:13:15 2021 +0500

    view-switcher-bar: Unset stack in dispose()
    
    Make sure we won't get an update_bar+revealed() call during dispose right
    after having unparented the action bar but before it's set to null. That
    only works by accident because we have a revealer that we do set to null,
    but it will become a problem in the next commit.

 src/adw-view-switcher-bar.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/src/adw-view-switcher-bar.c b/src/adw-view-switcher-bar.c
index 7b4b8782..b7d21364 100644
--- a/src/adw-view-switcher-bar.c
+++ b/src/adw-view-switcher-bar.c
@@ -156,6 +156,7 @@ adw_view_switcher_bar_dispose (GObject *object)
 {
   AdwViewSwitcherBar *self = ADW_VIEW_SWITCHER_BAR (object);
 
+  adw_view_switcher_bar_set_stack (self, NULL);
   gtk_widget_unparent (self->action_bar);
   self->revealer = NULL;
 


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