From f037efeaf7916783d7fb0d70c5d4903d4b80affa Mon Sep 17 00:00:00 2001 From: "rickg%netscape.com" Date: Fri, 13 Oct 2000 01:16:56 +0000 Subject: [PATCH] fix RTM++56085 crasher; r=attinasi, sr=buster --- htmlparser/src/CNavDTD.cpp | 2 +- parser/htmlparser/src/CNavDTD.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htmlparser/src/CNavDTD.cpp b/htmlparser/src/CNavDTD.cpp index 183b7e0bf05..aed5c2d17c6 100644 --- a/htmlparser/src/CNavDTD.cpp +++ b/htmlparser/src/CNavDTD.cpp @@ -891,7 +891,7 @@ nsresult CNavDTD::DidHandleStartTag(nsCParserNode& aNode,eHTMLTags aChildTag){ //handle tags by generating a close tag... //added this to fix bug 48351, which contains XHTML and uses empty tags. - if(nsHTMLElement::IsContainer(aChildTag)) { + if(nsHTMLElement::IsContainer(aChildTag) && aNode.mToken) { //nullptr test fixes bug 56085 CStartToken *theToken=NS_STATIC_CAST(CStartToken*,aNode.mToken); if(theToken->IsEmpty()){ diff --git a/parser/htmlparser/src/CNavDTD.cpp b/parser/htmlparser/src/CNavDTD.cpp index 183b7e0bf05..aed5c2d17c6 100644 --- a/parser/htmlparser/src/CNavDTD.cpp +++ b/parser/htmlparser/src/CNavDTD.cpp @@ -891,7 +891,7 @@ nsresult CNavDTD::DidHandleStartTag(nsCParserNode& aNode,eHTMLTags aChildTag){ //handle tags by generating a close tag... //added this to fix bug 48351, which contains XHTML and uses empty tags. - if(nsHTMLElement::IsContainer(aChildTag)) { + if(nsHTMLElement::IsContainer(aChildTag) && aNode.mToken) { //nullptr test fixes bug 56085 CStartToken *theToken=NS_STATIC_CAST(CStartToken*,aNode.mToken); if(theToken->IsEmpty()){