From 93a6a9d9ce61fb902d7a11f0ebc1682635f87e48 Mon Sep 17 00:00:00 2001 From: "alecf%netscape.com" Date: Fri, 7 Jan 2000 01:00:29 +0000 Subject: [PATCH] fix crash viewing Ben Goodger's vCard :) just a null pointer check, no reviewer --- mailnews/mime/cthandlers/vcard/mimevcrd.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mailnews/mime/cthandlers/vcard/mimevcrd.cpp b/mailnews/mime/cthandlers/vcard/mimevcrd.cpp index c11fcbd26c3a..dc13bac81ecc 100644 --- a/mailnews/mime/cthandlers/vcard/mimevcrd.cpp +++ b/mailnews/mime/cthandlers/vcard/mimevcrd.cpp @@ -1730,9 +1730,11 @@ static int WriteLineToStream (MimeObject *obj, const char *line) { int status = 0; char *htmlLine; - int htmlLen ; + int htmlLen =0; - htmlLen = nsCRT::strlen(line) + nsCRT::strlen("
") + 1;; + if (line) htmlLen += nsCRT::strlen(line); + + htmlLen += nsCRT::strlen("
") + 1; htmlLine = (char *) PR_MALLOC (htmlLen); if (htmlLine)