[evolution] Bug #668543 - Crash in view_modify_contact_cb() if contact has no UID
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #668543 - Crash in view_modify_contact_cb() if contact has no UID
- Date: Mon, 23 Apr 2012 11:35:37 +0000 (UTC)
commit e2832731d2594be58d9581075dc25a9845893b1d
Author: Milan Crha <mcrha redhat com>
Date: Mon Apr 23 13:34:56 2012 +0200
Bug #668543 - Crash in view_modify_contact_cb() if contact has no UID
addressbook/gui/widgets/e-addressbook-model.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
index bb8f2b5..1888248 100644
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ b/addressbook/gui/widgets/e-addressbook-model.c
@@ -278,6 +278,13 @@ view_modify_contact_cb (EBookClientView *client_view,
gint ii;
target_uid = e_contact_get_const (new_contact, E_CONTACT_UID);
+ g_warn_if_fail (target_uid != NULL);
+
+ /* skip contacts without UID */
+ if (!target_uid) {
+ contact_list = contact_list->next;
+ continue;
+ }
for (ii = 0; ii < array->len; ii++) {
EContact *old_contact;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]