diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index 50140fa9cabd..c447ec2f62e9 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -814,8 +814,7 @@ CSSParserImpl::ParseStyleAttribute(const nsAString& aAttributeValue, // In quirks mode, allow style declarations to have braces or not // (bug 99554). PRBool haveBraces; - if (mNavQuirkMode) { - GetToken(errorCode, PR_TRUE); + if (mNavQuirkMode && GetToken(errorCode, PR_TRUE)) { haveBraces = eCSSToken_Symbol == mToken.mType && '{' == mToken.mSymbol; UngetToken();