aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-folder-cache.c
diff options
context:
space:
mode:
authorRob Bradford <rob@robster.org.uk>2007-07-30 17:54:09 +0800
committerRob Bradford <rbradford@src.gnome.org>2007-07-30 17:54:09 +0800
commit67a110f6f99c02bb8b7ccb46495525843923fef0 (patch)
tree9237ed12f39db7e8e4b0a6e8863e7fa0952f6c51 /mail/mail-folder-cache.c
parent3129c718061144ecb87e222e75839d28d303bdc9 (diff)
downloadgsoc2013-evolution-67a110f6f99c02bb8b7ccb46495525843923fef0.tar.gz
gsoc2013-evolution-67a110f6f99c02bb8b7ccb46495525843923fef0.tar.zst
gsoc2013-evolution-67a110f6f99c02bb8b7ccb46495525843923fef0.zip
** Potential fix for: #453668
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. svn path=/trunk/; revision=33897
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r--mail/mail-folder-cache.c14
1 files changed, 8 insertions, 6 deletions
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++;
+ }
}
}