aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-10-02 19:31:10 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-10-02 19:58:38 +0800
commitf72a036cce9ff7ce9d1e96f7c72e42e83c8c4452 (patch)
tree96f3997c3322100b4cdac6d0b3c3def7afc626b0
parent33b5753dab14d6f387fdb0346aac5c0998489477 (diff)
downloadgsoc2013-empathy-f72a036cce9ff7ce9d1e96f7c72e42e83c8c4452.tar.gz
gsoc2013-empathy-f72a036cce9ff7ce9d1e96f7c72e42e83c8c4452.tar.zst
gsoc2013-empathy-f72a036cce9ff7ce9d1e96f7c72e42e83c8c4452.zip
individual-manager: make sure the individual stays alive when removing it
https://bugzilla.gnome.org/show_bug.cgi?id=685203
-rw-r--r--libempathy/empathy-individual-manager.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libempathy/empathy-individual-manager.c b/libempathy/empathy-individual-manager.c
index 8d14cdf0d..57815e13e 100644
--- a/libempathy/empathy-individual-manager.c
+++ b/libempathy/empathy-individual-manager.c
@@ -289,8 +289,14 @@ remove_individual (EmpathyIndividualManager *self, FolksIndividual *individual)
compare_individual_by_pop, NULL);
if (iter != NULL)
{
+ /* priv->top_individuals borrows its reference from
+ * priv->individuals_pop so we take a reference on the individual while
+ * removing it to make sure it stays alive while calling
+ * check_top_individuals(). */
+ g_object_ref (individual);
g_sequence_remove (iter);
check_top_individuals (self);
+ g_object_unref (individual);
}
g_signal_handlers_disconnect_by_func (individual,