]> code.citadel.org Git - citadel.git/blobdiff - webcit/msg_renderers.c
* don't choke on empty html messages
[citadel.git] / webcit / msg_renderers.c
index 489b0292a2851eaa46a12a8171e6875686a791ae..388ac50603983a31c21240b985e0e2309e40428f 100644 (file)
@@ -625,7 +625,11 @@ void render_MAIL_html(wc_mime_attachment *Mime, StrBuf *RawData, StrBuf *FoundCh
 {
        StrBuf *Buf;
        /* HTML is fun, but we've got to strip it first */
+       if (StrLength(Mime->Data) == 0)
+               return;
+
        Buf = NewStrBufPlain(NULL, StrLength(Mime->Data));
+
        output_html(ChrPtr(Mime->Charset), 
                    (WC->wc_view == VIEW_WIKI ? 1 : 0), 
                    StrToi(Mime->PartNum),