summaryrefslogtreecommitdiff
path: root/pith/flag.c
diff options
context:
space:
mode:
Diffstat (limited to 'pith/flag.c')
-rw-r--r--pith/flag.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pith/flag.c b/pith/flag.c
index b1bbf9c4..cf0ea39a 100644
--- a/pith/flag.c
+++ b/pith/flag.c
@@ -594,14 +594,16 @@ set_lflag(MAILSTREAM *stream, MSGNO_S *msgs, long int n, int f, int v)
was_invisible = (pelt->hidden || pelt->colhid) ? 1 : 0;
+ thrd = fetch_thread(stream, rawno);
+
if((chk_thrd_cnt = ((msgs->visible_threads >= 0L)
&& THRD_INDX_ENABLED() && (f & MN_HIDE) && (pelt->hidden != v))) != 0){
thrd = fetch_thread(stream, rawno);
if(thrd && thrd->top){
- if(thrd->top == thrd->rawno)
+ if(top_thread(stream, thrd->top) == thrd->rawno)
topthrd = thrd;
else
- topthrd = fetch_thread(stream, thrd->top);
+ topthrd = fetch_thread(stream, top_thread(stream, thrd->top));
}
if(topthrd){