[evolution-ews/gnome-3-2] Avoid crash on contact parsing (part of bug #648877)
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews/gnome-3-2] Avoid crash on contact parsing (part of bug #648877)
- Date: Thu, 8 Dec 2011 08:33:50 +0000 (UTC)
commit f719409b369c97690e30c249f93e7c685f46489e
Author: Milan Crha <mcrha redhat com>
Date: Thu Dec 8 09:32:52 2011 +0100
Avoid crash on contact parsing (part of bug #648877)
src/addressbook/e-book-backend-ews.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-ews.c b/src/addressbook/e-book-backend-ews.c
index 1c63155..405492b 100644
--- a/src/addressbook/e-book-backend-ews.c
+++ b/src/addressbook/e-book-backend-ews.c
@@ -183,8 +183,10 @@ ebews_populate_uid (EContact *contact, EEwsItem *item)
const EwsId *id;
id = e_ews_item_get_id (item);
- e_contact_set (contact, E_CONTACT_UID, id->id);
- e_contact_set (contact, E_CONTACT_REV, id->change_key);
+ if (id) {
+ e_contact_set (contact, E_CONTACT_UID, id->id);
+ e_contact_set (contact, E_CONTACT_REV, id->change_key);
+ }
}
static void
@@ -193,7 +195,8 @@ ebews_populate_full_name (EContact *contact, EEwsItem *item)
const EwsCompleteName *cn;
cn = e_ews_item_get_complete_name (item);
- e_contact_set (contact, E_CONTACT_FULL_NAME, cn->full_name);
+ if (cn)
+ e_contact_set (contact, E_CONTACT_FULL_NAME, cn->full_name);
}
static void
@@ -202,7 +205,8 @@ ebews_populate_nick_name (EContact *contact, EEwsItem *item)
const EwsCompleteName *cn;
cn = e_ews_item_get_complete_name (item);
- e_contact_set (contact, E_CONTACT_NICKNAME, cn->nick_name);
+ if (cn)
+ e_contact_set (contact, E_CONTACT_NICKNAME, cn->nick_name);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]