From 32e88fe79e3c9b078a8c0ba7276f8c25325356db Mon Sep 17 00:00:00 2001
From: Antonio Radici <antonio@dyne.org>
Date: Sun, 30 Dec 2012 19:48:23 -0800
Subject: [PATCH] Ensure that the in-reply-to header field was actually present
 before deciding it was removed.

closes #3378
---
 headers.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/headers.c b/headers.c
index 902eb9b8..578b33d8 100644
--- a/headers.c
+++ b/headers.c
@@ -114,8 +114,8 @@ void mutt_edit_headers (const char *editor,
      $edit_headers set, we remove References: as they're likely invalid;
      we can simply compare strings as we don't generate References for
      multiple Message-Ids in IRT anyways */
-  if (!n->in_reply_to || (msg->env->in_reply_to &&
-			  mutt_strcmp (n->in_reply_to->data,
+  if (msg->env->in_reply_to &&
+      (!n->in_reply_to || mutt_strcmp (n->in_reply_to->data,
 				       msg->env->in_reply_to->data) != 0))
     mutt_free_list (&msg->env->references);
 
-- 
2.40.0