aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-reply.c
diff options
context:
space:
mode:
Diffstat (limited to 'notmuch-reply.c')
-rw-r--r--notmuch-reply.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/notmuch-reply.c b/notmuch-reply.c
index 3b2b58d1..472a002e 100644
--- a/notmuch-reply.c
+++ b/notmuch-reply.c
@@ -537,9 +537,12 @@ create_reply_message(void *ctx,
"In-Reply-To", in_reply_to);
orig_references = notmuch_message_get_header (message, "references");
+ if (!orig_references)
+ /* Treat errors like missing References headers. */
+ orig_references = "";
references = talloc_asprintf (ctx, "%s%s%s",
- orig_references ? orig_references : "",
- orig_references ? " " : "",
+ *orig_references ? orig_references : "",
+ *orig_references ? " " : "",
in_reply_to);
g_mime_object_set_header (GMIME_OBJECT (reply),
"References", references);