diff options
author | Paul Menzel <paulepanter@users.sourceforge.net> | 2012-11-27 09:33:25 +0100 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-11-27 09:33:25 +0100 |
commit | ac7de1ebff192bab4e0bc508aa4603132f83e4d5 (patch) | |
tree | 817ca8a2dc7baf0623717e4025e2f3132c7112d0 | |
parent | db3dac45d6815bd7048a317da28c42065fb745ba (diff) | |
download | evolution-data-server-ac7de1ebff192bab4e0bc508aa4603132f83e4d5.tar.gz |
Bug #684175 - Check email value in e_destination_set_contact()
-rw-r--r-- | 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 0a165a51d..e4dd57630 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); |