Commit 14e5fc7b authored by Guido Gunther's avatar Guido Gunther Committed by Adrien Plazas
Browse files

HdyHeaderGroup: Disconnect from header bar's signals during dispose

The header bars might still emit signals which leads to

** (gnome-games:25525): CRITICAL **: 11:18:29.087: update_decoration_layouts: assertion 'HDY_IS_HEADER_GROUP (self)' failed

** (gnome-games:25525): CRITICAL **: 11:18:29.087: update_decoration_layouts: assertion 'HDY_IS_HEADER_GROUP (self)' failed

or actual crashes.

Fixes parts of #56
parent b5743d1d
Pipeline #2186 passed with stage
in 2 minutes and 54 seconds
......@@ -288,6 +288,10 @@ hdy_header_group_dispose (GObject *object)
HdyHeaderGroup *self = (HdyHeaderGroup *)object;
HdyHeaderGroupPrivate *priv = hdy_header_group_get_instance_private (self);
for (GSList *elem = priv->header_bars; elem; elem = elem->next) {
GtkHeaderBar *bar = GTK_HEADER_BAR (elem->data);
g_signal_handlers_disconnect_by_data (bar, self);
}
g_slist_free_full (priv->header_bars, (GDestroyNotify) g_object_unref);
priv->header_bars = NULL;
priv->focus = NULL;
......
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