X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mh.c;h=66216dc89e27913e04ca9705878f5822a9894213;hp=2770b8e76fcc17da388ceb26aee1f05e63ea23eb;hb=debd2491451020d9fd5f0440bb2dada0b9eac6e7;hpb=f32d447febdeb78039cd0da3ad91348f20dec721 diff --git a/mh.c b/mh.c index 2770b8e..66216dc 100644 --- a/mh.c +++ b/mh.c @@ -1312,7 +1312,8 @@ static int mh_sync_message (CONTEXT * ctx, int msgno) { HEADER *h = ctx->hdrs[msgno]; - if (h->attach_del || h->refs_changed || h->irt_changed) + if (h->attach_del || + (h->env && (h->env->refs_changed || h->env->irt_changed))) if (mh_rewrite_message (ctx, msgno) != 0) return -1; @@ -1323,7 +1324,8 @@ static int maildir_sync_message (CONTEXT * ctx, int msgno) { HEADER *h = ctx->hdrs[msgno]; - if (h->attach_del || h->refs_changed || h->irt_changed) { + if (h->attach_del || + (h->env && (h->env->refs_changed || h->env->irt_changed))) { /* when doing attachment deletion/rethreading, fall back to the MH case. */ if (mh_rewrite_message (ctx, msgno) != 0) return (-1);