aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-12-02 03:16:56 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-12-02 03:16:56 +0800
commit06408727b6352640db685cc9ad1e7c3fb9207c9f (patch)
tree98b563348fc21f39f04d94c892bdbb9a33fc216b /mail/message-list.c
parent704e0f44ba0eb5e857344d095e68bbae8be0b731 (diff)
downloadgsoc2013-evolution-06408727b6352640db685cc9ad1e7c3fb9207c9f.tar
gsoc2013-evolution-06408727b6352640db685cc9ad1e7c3fb9207c9f.tar.gz
gsoc2013-evolution-06408727b6352640db685cc9ad1e7c3fb9207c9f.tar.bz2
gsoc2013-evolution-06408727b6352640db685cc9ad1e7c3fb9207c9f.tar.lz
gsoc2013-evolution-06408727b6352640db685cc9ad1e7c3fb9207c9f.tar.xz
gsoc2013-evolution-06408727b6352640db685cc9ad1e7c3fb9207c9f.tar.zst
gsoc2013-evolution-06408727b6352640db685cc9ad1e7c3fb9207c9f.zip
Perform better error-handling.
2000-12-01 Jeffrey Stedfast <fejj@helixcode.com> * message-list.c (e_mail_address_new): Perform better error-handling. svn path=/trunk/; revision=6758
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index 9cc69daac4..c5895f97c5 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -152,10 +152,13 @@ e_mail_address_new (const char *address)
{
CamelInternetAddress *cia;
EMailAddress *new;
- const char *name, *addr;
+ const char *name = NULL, *addr = NULL;
cia = camel_internet_address_new ();
- camel_address_decode (CAMEL_ADDRESS (cia), address);
+ if (camel_address_unformat (CAMEL_ADDRESS (cia), address) == -1) {
+ camel_object_unref (CAMEL_OBJECT (cia));
+ return NULL;
+ }
camel_internet_address_get (cia, 0, &name, &addr);
new = g_new (EMailAddress, 1);