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




commit 1d7603a2beb93389491811d1413dcc5433b8b592
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]