From 4ac6ea4343b4e24f523a200e1526f76c25537728 Mon Sep 17 00:00:00 2001 From: Tristan Chabredier Date: Fri, 1 Dec 2006 09:21:55 +0000 Subject: [PATCH] 2006-12-01 [wwp] 2.6.0cvs71 * src/summaryview.c As the list may change while the mark as read delay runs, we can't rely on the 'row' pointer, which can be invalid when the timeout is called. As the mark as read is only done if the message is still selected, use summaryview->selected instead. Thanks to Colin. --- ChangeLog | 9 +++++++++ PATCHSETS | 1 + configure.ac | 2 +- src/summaryview.c | 4 +--- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 76ff3651e..5f0cfbccd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-12-01 [wwp] 2.6.0cvs71 + + * src/summaryview.c + As the list may change while the mark as read delay + runs, we can't rely on the 'row' pointer, which can + be invalid when the timeout is called. As the mark + as read is only done if the message is still selected, + use summaryview->selected instead. Thanks to Colin. + 2006-11-30 [paul] 2.6.0cvs70 * src/textview.c diff --git a/PATCHSETS b/PATCHSETS index edd1482e3..2bfde1992 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -2095,3 +2095,4 @@ ( cvs diff -u -r 1.5.2.43 -r 1.5.2.44 src/gtk/gtkutils.c; cvs diff -u -r 1.5.2.6 -r 1.5.2.7 src/gtk/gtkvscrollbutton.c; ) > 2.6.0cvs68.patchset ( cvs diff -u -r 1.1.2.38 -r 1.1.2.39 src/wizard.c; ) > 2.6.0cvs69.patchset ( cvs diff -u -r 1.96.2.159 -r 1.96.2.160 src/textview.c; ) > 2.6.0cvs70.patchset +( cvs diff -u -r 1.395.2.269 -r 1.395.2.270 src/summaryview.c; ) > 2.6.0cvs71.patchset diff --git a/configure.ac b/configure.ac index edf92e128..80a4aa88f 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=6 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=70 +EXTRA_VERSION=71 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/summaryview.c b/src/summaryview.c index 77104d2b6..c929bc532 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -2935,7 +2935,6 @@ static void msginfo_mark_as_read (SummaryView *summaryview, MsgInfo *msginfo, typedef struct { MsgInfo *msginfo; SummaryView *summaryview; - GtkCTreeNode *row; } MarkAsReadData; static int msginfo_mark_as_read_timeout(void *data) @@ -2946,7 +2945,7 @@ static int msginfo_mark_as_read_timeout(void *data) if (mdata->msginfo == summary_get_selected_msg(mdata->summaryview)) msginfo_mark_as_read(mdata->summaryview, mdata->msginfo, - mdata->row); + mdata->summaryview->selected); g_free(mdata); @@ -3006,7 +3005,6 @@ static void summary_display_msg_full(SummaryView *summaryview, MarkAsReadData *data = g_new0(MarkAsReadData, 1); data->summaryview = summaryview; data->msginfo = msginfo; - data->row = row; g_timeout_add(prefs_common.mark_as_read_delay * 1000, msginfo_mark_as_read_timeout, data); } else if (new_window || !prefs_common.mark_as_read_on_new_window) { -- 2.25.1