* src/folder.c
authorChristoph Hohmann <reboot@gmx.ch>
Sat, 27 Jul 2002 23:57:07 +0000 (23:57 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Sat, 27 Jul 2002 23:57:07 +0000 (23:57 +0000)
        add extra check if fetching the msginfo
        returned NULL

ChangeLog.claws
configure.in
src/folder.c

index 3287b1d..bb5512f 100644 (file)
@@ -1,3 +1,9 @@
+2002-07-27 [christoph] 0.8.0claws23
+
+       * src/folder.c
+               add extra check if fetching the msginfo
+               returned NULL
+
 2002-07-27 [paul]      0.8.0claws22
 
        * sync with 0.8.1cvs2
index 5125631..703b1bd 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=8
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws22
+EXTRA_VERSION=claws23
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 291595e..96f0f7f 100644 (file)
@@ -1283,15 +1283,19 @@ gint folder_item_add_msg(FolderItem *dest, const gchar *file,
         if (num > 0) {
                msginfo = folder->fetch_msginfo(folder, dest, num);
 
-               if(MSG_IS_NEW(msginfo->flags))
-                       dest->new++;
-               if(MSG_IS_UNREAD(msginfo->flags))
-                       dest->unread++;
-               dest->total++;
+               if(msginfo != NULL) {
+                       if(MSG_IS_NEW(msginfo->flags))
+                               dest->new++;
+                       if(MSG_IS_UNREAD(msginfo->flags))
+                               dest->unread++;
+                       dest->total++;
+
+                       msgcache_add_msg(dest->cache, msginfo);
+
+                       procmsg_msginfo_free(msginfo);
+               }
 
                 dest->last_num = num;
-                msgcache_add_msg(dest->cache, msginfo);
-               procmsg_msginfo_free(msginfo);
         }
 
        return num;