From dd0384472ded465c5124700accba8f4b786c51d1 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 2 Aug 2010 16:55:42 +0100 Subject: Don't warn when adding an existing contact Closes: bgo#625830 --- libempathy/empathy-individual-manager.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'libempathy') 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 -- cgit v1.2.3