Fix crash when unmarkin a message with unread children.
authorDarko Koruga <darko@users.sourceforge.net>
Tue, 24 Dec 2002 10:10:00 +0000 (10:10 +0000)
committerDarko Koruga <darko@users.sourceforge.net>
Tue, 24 Dec 2002 10:10:00 +0000 (10:10 +0000)
ChangeLog.claws
configure.in
src/summaryview.c

index 0dceaaf81a07962cf2cfa105fc1d995b20afa9b1..392353f5e655109e3fb317a01e8e4faecb491d51 100644 (file)
@@ -1,3 +1,8 @@
+2002-12-24 [darko]     0.8.7claws2
+
+       * src/summaryview.c
+               don't crash when unmarking message with unread children
+
 2002-12-23 [christoph] 0.8.7claws1
 
        * src/Makefile.am
index 937d0381de69f48f2f54b2cc59430c4a55e7deaa..47c8a5eeea5aec95da6d30e231c6f65fab3a9590 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=7
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws1
+EXTRA_VERSION=claws2
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 4404cb9a9793bd158c88778eaf6cd4e022143fd5..f04c1b29a6221766fceada01ea1d6fd66d813e98 100644 (file)
@@ -3104,20 +3104,25 @@ static void summary_unmark_row(SummaryView *summaryview, GtkCTreeNode *row)
        if (MSG_IS_DELETED(msginfo->flags))
                summaryview->deleted--;
        if (MSG_IS_MOVE(msginfo->flags)) {
+               if (!prefs_common.immediate_exec) {
+                       msginfo->to_folder->op_count--;
+                       if (msginfo->to_folder->op_count == 0)
+                               folder_update_item(msginfo->to_folder, FALSE);
+               }
                summaryview->moved--;
                changed = TRUE;
        }
        if (MSG_IS_COPY(msginfo->flags)) {
+               if (!prefs_common.immediate_exec) {
+                       msginfo->to_folder->op_count--;
+                       if (msginfo->to_folder->op_count == 0)
+                               folder_update_item(msginfo->to_folder, FALSE);
+               }
                summaryview->copied--;
                changed = TRUE;
        }
        changed |= summary_update_unread_children (summaryview, msginfo, FALSE);
 
-       if (changed && !prefs_common.immediate_exec) {
-               msginfo->to_folder->op_count--;
-               if (msginfo->to_folder->op_count == 0)
-                       folder_update_item(msginfo->to_folder, FALSE);
-       }
        msginfo->to_folder = NULL;
        procmsg_msginfo_unset_flags(msginfo, MSG_MARKED | MSG_DELETED, MSG_MOVE | MSG_COPY);
        summary_set_row_marks(summaryview, row);