Commit 73d07990 authored by Alexander Mikhaylenko's avatar Alexander Mikhaylenko
Browse files

view-switcher-title: Null-check view switcher in dispose()

If it's NULL, we can't get the stack anymore. This can happen if dispose()
is called multiple times.
parent c2d2b4da
Pipeline #54169 passed with stages
in 19 minutes and 31 seconds
......@@ -293,10 +293,14 @@ static void
hdy_view_switcher_title_dispose (GObject *object) {
HdyViewSwitcherTitle *self = (HdyViewSwitcherTitle *)object;
HdyViewSwitcherTitlePrivate *priv = hdy_view_switcher_title_get_instance_private (self);
GtkStack *stack = hdy_view_switcher_get_stack (priv->view_switcher);
GtkStack *stack;
if (priv->view_switcher) {
stack = hdy_view_switcher_get_stack (priv->view_switcher);
if (stack)
g_signal_handlers_disconnect_by_func (stack, G_CALLBACK (update_view_switcher_visible), self);
if (stack)
g_signal_handlers_disconnect_by_func (stack, G_CALLBACK (update_view_switcher_visible), self);
}
G_OBJECT_CLASS (hdy_view_switcher_title_parent_class)->dispose (object);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment