[empathy] Don't warn when adding an existing contact
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Don't warn when adding an existing contact
- Date: Mon, 2 Aug 2010 16:03:38 +0000 (UTC)
commit dd0384472ded465c5124700accba8f4b786c51d1
Author: Philip Withnall <philip withnall collabora co uk>
Date: Mon Aug 2 16:55:42 2010 +0100
Don't warn when adding an existing contact
Closes: bgo#625830
libempathy/empathy-individual-manager.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/libempathy/empathy-individual-manager.c b/libempathy/empathy-individual-manager.c
index 55541b2..5a708d4 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]