diff options
author | Not Zed <NotZed@Ximian.com> | 2005-01-31 15:24:38 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2005-01-31 15:24:38 +0800 |
commit | db1be26423ddb547fd29ce5d3de7ffa61fd3314f (patch) | |
tree | 534b1d66441f739b9c9d7399bc58b70377ccbe04 /mail | |
parent | 3a69dc3b8f569e829e7965cb095b29c4a61f67c0 (diff) | |
download | gsoc2013-evolution-db1be26423ddb547fd29ce5d3de7ffa61fd3314f.tar gsoc2013-evolution-db1be26423ddb547fd29ce5d3de7ffa61fd3314f.tar.gz gsoc2013-evolution-db1be26423ddb547fd29ce5d3de7ffa61fd3314f.tar.bz2 gsoc2013-evolution-db1be26423ddb547fd29ce5d3de7ffa61fd3314f.tar.lz gsoc2013-evolution-db1be26423ddb547fd29ce5d3de7ffa61fd3314f.tar.xz gsoc2013-evolution-db1be26423ddb547fd29ce5d3de7ffa61fd3314f.tar.zst gsoc2013-evolution-db1be26423ddb547fd29ce5d3de7ffa61fd3314f.zip |
** See bug #69850
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.
svn path=/trunk/; revision=28622
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/mail-autofilter.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index d3e02d4c2f..56b3d6446e 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -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 diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c index c660a03204..fe48b1777a 100644 --- a/mail/mail-autofilter.c +++ b/mail/mail-autofilter.c @@ -247,8 +247,8 @@ rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg 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, RuleContext *context, CamelMimeMessage *msg } 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; |