diff options
-rw-r--r-- | mail/ChangeLog | 8 | ||||
-rw-r--r-- | mail/mail-folder-cache.c | 14 |
2 files changed, 16 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 075849b1bf..2ba70b9dfa 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2007-07-29 Rob Bradford <rob@robster.org.uk> + + ** Potential fix for: #453668 + + * mail-folder-cache.c: (folder_changed): + Deal with the fact that camel_folder_get_message_info can return NULL + and therefore don't try and dereference anything from that pointer. + 2007-07-29 Srinivasa Ragavan <sragavan@novell.com> ** Fix for bug #459030 diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index 92a4e01732..fe2d99f4f3 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -459,12 +459,14 @@ folder_changed (CamelObject *o, gpointer event_data, gpointer user_data) brand new, not junk and not already deleted */ for (i = 0; i < changes->uid_added->len; i++) { info = camel_folder_get_message_info (folder, changes->uid_added->pdata[i]); - flags = camel_message_info_flags (info); - if (((flags & CAMEL_MESSAGE_SEEN) == 0) && - ((flags & CAMEL_MESSAGE_JUNK) == 0) && - ((flags & CAMEL_MESSAGE_DELETED) == 0) && - (camel_message_info_date_received (info) > last_newmail)) - new++; + if (info) { + flags = camel_message_info_flags (info); + if (((flags & CAMEL_MESSAGE_SEEN) == 0) && + ((flags & CAMEL_MESSAGE_JUNK) == 0) && + ((flags & CAMEL_MESSAGE_DELETED) == 0) && + (camel_message_info_date_received (info) > last_newmail)) + new++; + } } } |