aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/message-list.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index c6fba1cfff..51bbdbf099 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2000-12-01 Jeffrey Stedfast <fejj@helixcode.com>
+
+ * message-list.c (e_mail_address_new): Perform better
+ error-handling.
+
2000-12-01 Radek Doulik <rodo@helixcode.com>
* mail-ops.c (mail_op_report_status): use mail_op_set_message_plain
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);