From: Brendan Cully Date: Thu, 22 Sep 2005 03:23:09 +0000 (+0000) Subject: If ContentType is null, assume text/plain. Stopgap; a better mechanism would X-Git-Tag: mutt-1-5-12-rel~342 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5677cb4e8c727a9db289a614121f1de7043ea0cb;p=mutt If ContentType is null, assume text/plain. Stopgap; a better mechanism would sanity-check MuttVars assignments before allowing them. Closes: #2080. --- diff --git a/send.c b/send.c index ccd6fcae..5d7363ed 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;