[evolution-data-server] Bug #684175 - Check email value in e_destination_set_contact()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #684175 - Check email value in e_destination_set_contact()
- Date: Tue, 27 Nov 2012 08:32:57 +0000 (UTC)
commit 2df3cc4ea19a9ee2b2f5d6954d56f74c024287db
Author: Paul Menzel <paulepanter users sourceforge net>
Date: Tue Nov 27 09:30:09 2012 +0100
Bug #684175 - Check email value in e_destination_set_contact()
addressbook/libebook/e-destination.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/addressbook/libebook/e-destination.c b/addressbook/libebook/e-destination.c
index 0a165a5..e4dd576 100644
--- a/addressbook/libebook/e-destination.c
+++ b/addressbook/libebook/e-destination.c
@@ -468,13 +468,13 @@ e_destination_set_contact (EDestination *dest,
raw = e_vcard_attribute_get_value (attr->data);
addr = camel_internet_address_new ();
- camel_address_unformat (CAMEL_ADDRESS (addr), raw);
- camel_internet_address_get (addr, 0, &name, &email);
+ if (camel_address_unformat (CAMEL_ADDRESS (addr), raw) > 0 &&
+ camel_internet_address_get (addr, 0, &name, &email)) {
+ e_destination_set_name (s_dest, name);
+ e_destination_set_email (s_dest, email);
- e_destination_set_name (s_dest, name);
- e_destination_set_email (s_dest, email);
-
- dest->priv->list_alldests = g_list_append (dest->priv->list_alldests, s_dest);
+ dest->priv->list_alldests = g_list_append (dest->priv->list_alldests, s_dest);
+ }
g_object_unref (addr);
g_free (raw);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]