diff --git a/mailnews/mime/src/mimemult.cpp b/mailnews/mime/src/mimemult.cpp index 11aebf4933fa..a6f2272a2b26 100644 --- a/mailnews/mime/src/mimemult.cpp +++ b/mailnews/mime/src/mimemult.cpp @@ -264,9 +264,12 @@ MimeMultipart_parse_line (char *line, PRInt32 length, MimeObject *obj) if (detachingPart) { char *contentType = MimeHeaders_get(mult->hdrs, "Content-Type", PR_FALSE, PR_FALSE); - MimeWriteAString(obj, NS_LITERAL_CSTRING("Content-Type: ")); - MimeWriteAString(obj, nsDependentCString(contentType)); - PR_Free(contentType); + if (contentType) + { + MimeWriteAString(obj, NS_LITERAL_CSTRING("Content-Type: ")); + MimeWriteAString(obj, nsDependentCString(contentType)); + PR_Free(contentType); + } char *contentEncoding = MimeHeaders_get(mult->hdrs, "Content-Transfer-Encoding", PR_FALSE, PR_FALSE); if (contentEncoding) {