diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2010-09-02 01:38:42 +0800 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2010-09-02 17:21:45 +0800 |
commit | 96bf4cf74db1b5c4be55202dcd0e7701ea6cbcd3 (patch) | |
tree | acf5224925be638e786c811a37b008be50ba2abe | |
parent | 326f9c92459246f8124ad6b2091a7f91ec7d5bda (diff) | |
download | gsoc2013-empathy-96bf4cf74db1b5c4be55202dcd0e7701ea6cbcd3.tar gsoc2013-empathy-96bf4cf74db1b5c4be55202dcd0e7701ea6cbcd3.tar.gz gsoc2013-empathy-96bf4cf74db1b5c4be55202dcd0e7701ea6cbcd3.tar.bz2 gsoc2013-empathy-96bf4cf74db1b5c4be55202dcd0e7701ea6cbcd3.tar.lz gsoc2013-empathy-96bf4cf74db1b5c4be55202dcd0e7701ea6cbcd3.tar.xz gsoc2013-empathy-96bf4cf74db1b5c4be55202dcd0e7701ea6cbcd3.tar.zst gsoc2013-empathy-96bf4cf74db1b5c4be55202dcd0e7701ea6cbcd3.zip |
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.
-rw-r--r-- | libempathy-gtk/empathy-individual-view.c | 5 |
1 files 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; } |