[evolution-patches] 69850, crash creating vfolder





? mail/evolution-mail-2.0.schemas
? mail/ma.diff
? mail/default/zh_CN/Makefile
? mail/default/zh_CN/Makefile.in
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3554
diff -u -p -r1.3554 ChangeLog
--- mail/ChangeLog	31 Jan 2005 03:18:45 -0000	1.3554
+++ mail/ChangeLog	31 Jan 2005 07:18:13 -0000
@@ -1,5 +1,10 @@
 2005-01-31  Not Zed  <NotZed Ximian com>
 
+	** See bug #69850
+	
+	* mail-autofilter.c (rule_from_message): dont crash if we're
+	missing the requested headers.
+
 	** See bug #71521.
 
 	* em-account-editor.c (emae_url_set_hostport): dont ever set a
Index: mail/mail-autofilter.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-autofilter.c,v
retrieving revision 1.51
diff -u -p -r1.51 mail-autofilter.c
--- mail/mail-autofilter.c	17 Jun 2004 07:34:49 -0000	1.51
+++ mail/mail-autofilter.c	31 Jan 2005 07:18:13 -0000
@@ -247,8 +247,8 @@ rule_from_message (FilterRule *rule, Rul
 		char *namestr;
 		
 		from = camel_mime_message_get_from (msg);
-		for (i = 0; camel_internet_address_get (from, i, &name, &addr); i++) {
-			rule_add_sender (context, rule, addr);
+		for (i = 0; from && camel_internet_address_get (from, i, &name, &addr); i++) {
+			rule_add_sender(context, rule, addr);
 			if (name == NULL || name[0] == '\0')
 				name = addr;
 			namestr = g_strdup_printf(_("Mail from %s"), name);
@@ -258,9 +258,11 @@ rule_from_message (FilterRule *rule, Rul
 	}
 	if (flags & AUTO_TO) {
 		addr = (CamelInternetAddress *)camel_mime_message_get_recipients (msg, CAMEL_RECIPIENT_TYPE_TO);
-		rule_match_recipients (context, rule, addr);
+		if (addr)
+			rule_match_recipients (context, rule, addr);
 		addr = (CamelInternetAddress *)camel_mime_message_get_recipients (msg, CAMEL_RECIPIENT_TYPE_CC);
-		rule_match_recipients (context, rule, addr);
+		if (addr)
+			rule_match_recipients (context, rule, addr);
 	}
 	if (flags & AUTO_MLIST) {
 		char *name, *mlist;


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