aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog3
-rw-r--r--camel/camel-folder.c9
2 files changed, 8 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 97ccb5bfd7..375d10b5f7 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,8 @@
2001-09-25 <NotZed@Ximian.com>
+ * camel-folder.c (get_unread_message_count): Only unref info if we
+ got it.
+
* camel-operation.c (camel_operation_unref): Fix for !threads
enabled not ccompiling.
(camel_operation_ref): Assert refcount > 0.
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;