Revert "Remove unnecessary null check (#3213)"
This reverts commit 6d13975def
.
This commit is contained in:
parent
6d13975def
commit
e6d1b44758
|
@ -1378,7 +1378,7 @@ void CheckStl::if_find()
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const Token *conditionStart = scope.classDef->next();
|
const Token *conditionStart = scope.classDef->next();
|
||||||
if (Token::simpleMatch(conditionStart->astOperand2(), ";"))
|
if (conditionStart && Token::simpleMatch(conditionStart->astOperand2(), ";"))
|
||||||
conditionStart = conditionStart->astOperand2();
|
conditionStart = conditionStart->astOperand2();
|
||||||
|
|
||||||
for (const Token *tok = conditionStart; tok->str() != "{"; tok = tok->next()) {
|
for (const Token *tok = conditionStart; tok->str() != "{"; tok = tok->next()) {
|
||||||
|
|
Loading…
Reference in New Issue