aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author5 <NotZed@Ximian.com>2001-09-26 06:19:40 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-09-26 06:19:40 +0800
commit3420538a5c595b67da2a59c590a7aa628046ffb7 (patch)
treeb2616a6ee3d48f994a47245c5d487804bf21b7f2
parentba5b1b6be7d3beed85c1f6b51d5808f9a7d72b5f (diff)
downloadgsoc2013-evolution-3420538a5c595b67da2a59c590a7aa628046ffb7.tar.gz
gsoc2013-evolution-3420538a5c595b67da2a59c590a7aa628046ffb7.tar.zst
gsoc2013-evolution-3420538a5c595b67da2a59c590a7aa628046ffb7.zip
Only unref info if we got it.
2001-09-25 <NotZed@Ximian.com> * camel-folder.c (get_unread_message_count): Only unref info if we got it. svn path=/trunk/; revision=13130
-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;