[evolution-patches] 42400, crash clicking on non-selectable folder



This patch doesn't actually fix the reason the problem happens, but it
addresses a potential crash if something tries to open a bogus folder.

 Z

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.2715
diff -u -3 -r1.2715 ChangeLog
--- ChangeLog	6 May 2003 00:04:00 -0000	1.2715
+++ ChangeLog	6 May 2003 00:13:13 -0000
@@ -1,3 +1,10 @@
+2003-05-06  Not Zed  <NotZed Ximian com>
+
+	** See bug #42400
+
+	* mail-tools.c (meta_data_key): protect against getting an
+	unparsable uri.
+
 2003-05-05  Not Zed  <NotZed Ximian com>
 
 	** See bug #42294.
Index: mail-tools.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-tools.c,v
retrieving revision 1.113
diff -u -3 -r1.113 mail-tools.c
--- mail-tools.c	25 Mar 2003 01:38:46 -0000	1.113
+++ mail-tools.c	6 May 2003 00:13:13 -0000
@@ -508,6 +508,14 @@
 	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);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]