[empathy] individual-manager: make sure the individual stays alive when removing it
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] individual-manager: make sure the individual stays alive when removing it
- Date: Tue, 2 Oct 2012 11:58:54 +0000 (UTC)
commit f72a036cce9ff7ce9d1e96f7c72e42e83c8c4452
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Tue Oct 2 13:31:10 2012 +0200
individual-manager: make sure the individual stays alive when removing it
https://bugzilla.gnome.org/show_bug.cgi?id=685203
libempathy/empathy-individual-manager.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libempathy/empathy-individual-manager.c b/libempathy/empathy-individual-manager.c
index 8d14cdf..57815e1 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]