From 96bf4cf74db1b5c4be55202dcd0e7701ea6cbcd3 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 1 Sep 2010 18:38:42 +0100 Subject: Only unref the EmpathyIndividualView after emptying the group hash table Otherwise, unreffing the view could cause it to be destroyed, and thus emptying the hash table will write into freed memory and crash. --- libempathy-gtk/empathy-individual-view.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c index 05429d016..2f47f843c 100644 --- a/libempathy-gtk/empathy-individual-view.c +++ b/libempathy-gtk/empathy-individual-view.c @@ -1503,13 +1503,12 @@ individual_view_expand_idle_cb (EmpathyIndividualView *self) g_signal_handlers_unblock_by_func (self, individual_view_row_expand_or_collapse_cb, GINT_TO_POINTER (TRUE)); - priv->expand_groups_idle_handler = 0; - g_object_unref (self); - /* Empty the table of groups to expand/contract, since it may contain groups * which no longer exist in the tree view. This can happen after going * offline, for example. */ g_hash_table_remove_all (priv->expand_groups); + priv->expand_groups_idle_handler = 0; + g_object_unref (self); return FALSE; } -- cgit v1.2.3