aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2010-09-01 21:32:08 +0800
committerPhilip Withnall <philip.withnall@collabora.co.uk>2010-09-01 21:38:33 +0800
commit416fc11e36c34a4c7ea489a25904ac9c6df4bd78 (patch)
tree6346ea159847e9568162ea11beed0a46d991b293
parent85d6992961f24ed935a17ef8b09de11e75986c9e (diff)
downloadgsoc2013-empathy-416fc11e36c34a4c7ea489a25904ac9c6df4bd78.tar
gsoc2013-empathy-416fc11e36c34a4c7ea489a25904ac9c6df4bd78.tar.gz
gsoc2013-empathy-416fc11e36c34a4c7ea489a25904ac9c6df4bd78.tar.bz2
gsoc2013-empathy-416fc11e36c34a4c7ea489a25904ac9c6df4bd78.tar.lz
gsoc2013-empathy-416fc11e36c34a4c7ea489a25904ac9c6df4bd78.tar.xz
gsoc2013-empathy-416fc11e36c34a4c7ea489a25904ac9c6df4bd78.tar.zst
gsoc2013-empathy-416fc11e36c34a4c7ea489a25904ac9c6df4bd78.zip
Remove the expand groups idle handler when destroying an EmpathyIndividualView
This prevents the idle handler from being run after destruction and crashing due to referencing the EmpathyIndividualView's private memory which has already been freed.
-rw-r--r--libempathy-gtk/empathy-individual-view.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 34032d651..05429d016 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -1503,8 +1503,8 @@ 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));
- g_object_unref (self);
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
@@ -1927,6 +1927,8 @@ individual_view_finalize (GObject *object)
{
EmpathyIndividualViewPriv *priv = GET_PRIV (object);
+ if (priv->expand_groups_idle_handler != 0)
+ g_source_remove (priv->expand_groups_idle_handler);
g_hash_table_destroy (priv->expand_groups);
G_OBJECT_CLASS (empathy_individual_view_parent_class)->finalize (object);