From: Darko Koruga Date: Tue, 24 Dec 2002 10:10:00 +0000 (+0000) Subject: Fix crash when unmarkin a message with unread children. X-Git-Tag: rel_0_8_8~13 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=91120427b5a87301440cad552df938c18c8a5c01;ds=sidebyside Fix crash when unmarkin a message with unread children. --- diff --git a/ChangeLog.claws b/ChangeLog.claws index 0dceaaf81..392353f5e 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -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 diff --git a/configure.in b/configure.in index 937d0381d..47c8a5eee 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/src/summaryview.c b/src/summaryview.c index 4404cb9a9..f04c1b29a 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -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);