Skip to content
Snippets Groups Projects
Commit 14e5fc7b authored by Guido Gunther's avatar Guido Gunther :zzz: 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
No related branches found
No related tags found
1 merge request!145hdy-header-group: Don't invoke signal handlers on finalized HeaderGroups
Pipeline #2187 passed
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment