diff options
Diffstat (limited to 'camel/camel-folder.c')
-rw-r--r-- | camel/camel-folder.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/camel/camel-folder.c b/camel/camel-folder.c index ec23a55c71..ead3e969be 100644 --- a/camel/camel-folder.c +++ b/camel/camel-folder.c @@ -436,10 +436,11 @@ get_unread_message_count(CamelFolder *folder) for (i=0; i<count; i++) { CamelMessageInfo *info = camel_folder_summary_index(folder->summary, i); - if (info && !(info->flags & CAMEL_MESSAGE_SEEN)) - unread++; - - camel_folder_summary_info_free(folder->summary, info); + if (info) { + if (!(info->flags & CAMEL_MESSAGE_SEEN)) + unread++; + camel_folder_summary_info_free(folder->summary, info); + } } return unread; |