[evolution-patches] 73559, crash with 'source account' filter




should fix the crash, and additionally only show source accounts which actually have sources

Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3604
diff -u -p -r1.3604 ChangeLog
--- mail/ChangeLog	11 Mar 2005 01:27:27 -0000	1.3604
+++ mail/ChangeLog	16 Mar 2005 06:00:12 -0000
@@ -1,3 +1,11 @@
+2005-03-16  Not Zed  <NotZed Ximian com>
+
+	** See bug #73559
+	
+	* em-filter-source-element.c
+	(em_filter_source_element_get_sources): check the url != "" and decoded
+	before using it.
+
 2005-03-10  Not Zed  <NotZed Ximian com>
 
 	** See bug #73293
Index: mail/em-filter-source-element.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-filter-source-element.c,v
retrieving revision 1.3
diff -u -p -r1.3 em-filter-source-element.c
--- mail/em-filter-source-element.c	18 Jan 2005 13:19:23 -0000	1.3
+++ mail/em-filter-source-element.c	16 Mar 2005 06:00:12 -0000
@@ -360,16 +360,17 @@ em_filter_source_element_get_sources(EMF
 	     e_iterator_next(it)) {
 		account = (const EAccount *)e_iterator_get(it);
 
-		if (account->source == NULL || account->source->url == NULL)
+		if (account->source == NULL || account->source->url == NULL || account->source->url[0] == 0)
 			continue;
 
-		/* hide secret stuff */
 		url = camel_url_new(account->source->url, NULL);
-		uri = camel_url_to_string(url, CAMEL_URL_HIDE_ALL);
-		camel_url_free(url);
-
-		em_filter_source_element_add_source(fs, account->name, account->id->name, account->id->address, uri);
-		g_free(uri);
+		if (url) {
+			/* hide secret stuff */
+			uri = camel_url_to_string(url, CAMEL_URL_HIDE_ALL);
+			camel_url_free(url);
+			em_filter_source_element_add_source(fs, account->name, account->id->name, account->id->address, uri);
+			g_free(uri);
+		}
 	}
 	g_object_unref(it);
 	g_object_unref(accounts);


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