aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
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);