Fixed CID 1037088 Dereference after null check in Tokenizer::simplifyLabelsCaseDefault.
This commit is contained in:
parent
7920afdc60
commit
6183f21070
|
@ -2211,7 +2211,7 @@ void Tokenizer::simplifyLabelsCaseDefault()
|
||||||
if (Token::Match(tok->next(),"[:{};]"))
|
if (Token::Match(tok->next(),"[:{};]"))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (tok->str() != "case" && tok->next()->str() == ":") {
|
if (tok->str() != "case" && tok->next() && tok->next()->str() == ":") {
|
||||||
tok = tok->next();
|
tok = tok->next();
|
||||||
if (tok->next()->str() != ";")
|
if (tok->next()->str() != ";")
|
||||||
tok->insertToken(";");
|
tok->insertToken(";");
|
||||||
|
|
Loading…
Reference in New Issue