From ba201c0f99ccf86e6caada4ba43a050e42e63bed Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 7 May 2003 00:53:40 +0000 Subject: ** See bug #42400 2003-05-06 Not Zed ** See bug #42400 * mail-tools.c (meta_data_key): protect against getting an unparsable uri. svn path=/trunk/; revision=21119 --- mail/mail-tools.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mail/mail-tools.c') diff --git a/mail/mail-tools.c b/mail/mail-tools.c index 565fcaed71..43c67a2fb7 100644 --- a/mail/mail-tools.c +++ b/mail/mail-tools.c @@ -508,6 +508,14 @@ static char *meta_data_key(const char *uri, char **pathp) char *p, c; url = camel_url_new(uri, NULL); + + if (url == NULL) { + g_warning("Trying to retrieve meta-data for unparsable uri: %s", uri); + *pathp = g_build_path(evolution_dir, "meta/unknown", NULL); + + return g_strdup("folder"); + } + path = g_string_new(evolution_dir); g_string_append_printf(path, "/meta/%s/", url->protocol); -- cgit