2004-09-13 [christoph] 0.9.12cvs100
authorChristoph Hohmann <reboot@gmx.ch>
Mon, 13 Sep 2004 13:16:33 +0000 (13:16 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Mon, 13 Sep 2004 13:16:33 +0000 (13:16 +0000)
* src/folder.c
add NULL pointer checks to fix segfault when messages can
not be fetched

ChangeLog.claws
PATCHSETS
configure.ac
src/folder.c

index 76c724b..794bb51 100644 (file)
@@ -1,3 +1,9 @@
+2004-09-13 [christoph] 0.9.12cvs100
+
+       * src/folder.c
+               add NULL pointer checks to fix segfault when messages can
+               not be fetched
+
 2004-09-08 [colin]     0.9.12cvs99
 
        * src/account.c
index c3bae5d..ed8503f 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
@@ -82,3 +82,4 @@
 ( cvs diff -u -r 1.175 -r 1.176 src/inc.c; ) > 0.9.12cvs97.patchset
 ( cvs diff -u -r 1.258 -r 1.259 src/folder.c; cvs diff -u -r 1.166 -r 1.167 src/procmsg.c; cvs diff -u -r 1.70 -r 1.71 src/procmsg.h; cvs diff -u -r 1.3 -r 1.4 src/plugins/pgpmime/pgpmime.c; ) > 0.9.12cvs98.patchset
 ( cvs diff -u -r 1.72 -r 1.73 src/account.c; ) > 0.9.12cvs99.patchset
+( cvs diff -u -r 1.259 -r 1.260 src/folder.c; ) > 0.9.12cvs100.patchset
index 737bddf..e21fd06 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=99
+EXTRA_VERSION=100
 EXTRA_RELEASE=
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
index f75e98f..d05b790 100644 (file)
@@ -2104,20 +2104,24 @@ gchar *folder_item_fetch_msg(FolderItem *item, gint num)
 
        msgfile = folder->klass->fetch_msg(folder, item, num);
 
-       msginfo = folder_item_get_msginfo(item, num);
-       if ((msginfo != NULL) && !MSG_IS_SCANNED(msginfo->flags)) {
-               MimeInfo *mimeinfo;
-
-               if (msginfo->folder->stype != F_QUEUE && 
-                   msginfo->folder->stype != F_DRAFT)
-                       mimeinfo = procmime_scan_file(msgfile);
-               else
-                       mimeinfo = procmime_scan_queue_file(msgfile);
-               /* check for attachments */
-               g_node_children_foreach(mimeinfo->node, G_TRAVERSE_ALL, msginfo_set_mime_flags, msginfo);
-               procmime_mimeinfo_free_all(mimeinfo);
+       if (msgfile != NULL) {
+               msginfo = folder_item_get_msginfo(item, num);
+               if ((msginfo != NULL) && !MSG_IS_SCANNED(msginfo->flags)) {
+                       MimeInfo *mimeinfo;
+
+                       if (msginfo->folder->stype != F_QUEUE && 
+                           msginfo->folder->stype != F_DRAFT)
+                               mimeinfo = procmime_scan_file(msgfile);
+                       else
+                               mimeinfo = procmime_scan_queue_file(msgfile);
+                       /* check for attachments */
+                       if (mimeinfo != NULL) { 
+                               g_node_children_foreach(mimeinfo->node, G_TRAVERSE_ALL, msginfo_set_mime_flags, msginfo);
+                               procmime_mimeinfo_free_all(mimeinfo);
 
-               procmsg_msginfo_set_flags(msginfo, 0, MSG_SCANNED);
+                               procmsg_msginfo_set_flags(msginfo, 0, MSG_SCANNED);
+                       }
+               }
        }
 
        return msgfile;