* src/compose.c
authorChristoph Hohmann <reboot@gmx.ch>
Tue, 19 Nov 2002 21:10:31 +0000 (21:10 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Tue, 19 Nov 2002 21:10:31 +0000 (21:10 +0000)
        fix segfault, when draft saving does not get
        the MsgInfo of the new message
        (closes bug [ 640699 ] Claws170: crash drafting
         mail ( IMAP ))

ChangeLog.claws
configure.in
src/compose.c

index bc12294..637a18f 100644 (file)
@@ -1,3 +1,11 @@
+2002-11-19 [christoph] 0.8.5claws171
+
+       * src/compose.c
+               fix segfault, when draft saving does not get
+               the MsgInfo of the new message
+               (closes bug [ 640699 ] Claws170: crash drafting
+                mail ( IMAP ))
+
 2002-11-19 [christoph] 0.8.5claws170
 
        * src/procmsg.c
index 7a6202c..f760c8d 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws170
+EXTRA_VERSION=claws171
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index d86fd7c..8c076e3 100644 (file)
@@ -6399,10 +6399,12 @@ static void compose_draft_cb(gpointer data, guint action, GtkWidget *widget)
        }
 
        newmsginfo = folder_item_get_msginfo(draft, msgnum);
-       procmsg_msginfo_unset_flags(newmsginfo, ~0, ~0);
-       MSG_SET_TMP_FLAGS(newmsginfo->flags, MSG_DRAFT);
-       folder_update_item(draft, TRUE);
-       procmsg_msginfo_free(newmsginfo);
+       if (newmsginfo) {
+               procmsg_msginfo_unset_flags(newmsginfo, ~0, ~0);
+               procmsg_msginfo_set_flags(newmsginfo, 0, MSG_DRAFT);
+               folder_update_item(draft, TRUE);
+               procmsg_msginfo_free(newmsginfo);
+       }
        
        lock = FALSE;