From 95d5b1a0c893b69266e2e21029b03371bcc72049 Mon Sep 17 00:00:00 2001 From: Brendan Cully Date: Thu, 22 Sep 2005 03:23:09 +0000 Subject: [PATCH] If ContentType is null, assume text/plain. Stopgap; a better mechanism would sanity-check MuttVars assignments before allowing them. Closes: #2080. --- send.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/send.c b/send.c index ccd6fcaeb..5d7363ed1 100644 --- a/send.c +++ b/send.c @@ -1122,8 +1122,9 @@ ci_send_message (int flags, /* send mode */ pbody = mutt_new_body (); pbody->next = msg->content; /* don't kill command-line attachments */ msg->content = pbody; - - ctype = safe_strdup (ContentType); + + if (!(ctype = safe_strdup (ContentType))) + ctype = safe_strdup ("text/plain"); mutt_parse_content_type (ctype, msg->content); FREE (&ctype); msg->content->unlink = 1; -- 2.40.0