]> granicus.if.org Git - neomutt/commitdiff
fix further crash in ci_send_message()
authorChristian Storm <storm@mailbox.org>
Fri, 29 Mar 2019 11:54:05 +0000 (12:54 +0100)
committerRichard Russon <rich@flatcap.org>
Fri, 29 Mar 2019 12:38:49 +0000 (12:38 +0000)
Signed-off-by: Christian Storm <storm@mailbox.org>
send.c

diff --git a/send.c b/send.c
index cc844488c2207d06855b9bf07399b3d3f406ed98..adddebf0b5d634a489c9f439f72830d1a67bf661 100644 (file)
--- a/send.c
+++ b/send.c
@@ -2018,7 +2018,7 @@ int ci_send_message(SendFlags flags, struct Email *msg, const char *tempfile,
 
     /* include replies/forwarded messages, unless we are given a template */
     if (!tempfile && (ctx || !(flags & (SEND_REPLY | SEND_FORWARD))) &&
-        (generate_body(fp_tmp, msg, flags, ctx->mailbox, el) == -1))
+        (generate_body(fp_tmp, msg, flags, ctx ? ctx->mailbox : NULL, el) == -1))
     {
       goto cleanup;
     }