aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2010-08-02 23:55:42 +0800
committerPhilip Withnall <philip.withnall@collabora.co.uk>2010-08-03 00:03:12 +0800
commitdd0384472ded465c5124700accba8f4b786c51d1 (patch)
treea17dea9411e595a54aedfdb26e5dd3be8195ea2e
parent25c5ac2188cde02fe35d9d29eccb11adb6950a8b (diff)
downloadgsoc2013-empathy-dd0384472ded465c5124700accba8f4b786c51d1.tar
gsoc2013-empathy-dd0384472ded465c5124700accba8f4b786c51d1.tar.gz
gsoc2013-empathy-dd0384472ded465c5124700accba8f4b786c51d1.tar.bz2
gsoc2013-empathy-dd0384472ded465c5124700accba8f4b786c51d1.tar.lz
gsoc2013-empathy-dd0384472ded465c5124700accba8f4b786c51d1.tar.xz
gsoc2013-empathy-dd0384472ded465c5124700accba8f4b786c51d1.tar.zst
gsoc2013-empathy-dd0384472ded465c5124700accba8f4b786c51d1.zip
Don't warn when adding an existing contact
Closes: bgo#625830
-rw-r--r--libempathy/empathy-individual-manager.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libempathy/empathy-individual-manager.c b/libempathy/empathy-individual-manager.c
index 55541b299..5a708d4d0 100644
--- a/libempathy/empathy-individual-manager.c
+++ b/libempathy/empathy-individual-manager.c
@@ -283,12 +283,16 @@ aggregator_add_persona_from_details_cb (GObject *source,
g_clear_error (&error);
}
- /* Set the contact's persona */
- empathy_contact_set_persona (contact, persona);
+ /* The persona can be NULL even if there wasn't an error, if the persona was
+ * already in the contact list */
+ if (persona != NULL)
+ {
+ /* Set the contact's persona */
+ empathy_contact_set_persona (contact, persona);
+ g_object_unref (persona);
+ }
- /* We can unref the contact now */
g_object_unref (contact);
- g_object_unref (persona);
}
void