* don't choke on empty html messages
authorWilfried Göesgens <willi@citadel.org>
Sun, 9 Nov 2008 10:16:12 +0000 (10:16 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sun, 9 Nov 2008 10:16:12 +0000 (10:16 +0000)
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),