Dont crash (at least in debug mode) when a stream cannot be opened.

This commit is contained in:
jevering
1998-05-15 18:16:39 +00:00
parent 2672ba0d2b
commit 7ebe887be5
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -412,6 +412,12 @@ PRBool nsHTMLParser::IterateTokens() {
while((!done) && (result)) {
theToken=(CToken*)mCurrentPos->GetCurrent();
#if defined(NS_DEBUG)
if (!theToken)
break;
#endif
eHTMLTokenTypes type=eHTMLTokenTypes(theToken->GetTokenType());
iteration++; //debug purposes...