fixed cppcheck inconclusive warning, possible null pointer dereference otherwise condition is redundant
This commit is contained in:
parent
ca5e9740b4
commit
4511d0fe5f
|
@ -402,6 +402,11 @@ void ExecutionPath::checkScope(const Token *tok, std::list<ExecutionPath *> &che
|
||||||
if (tok && tok->str() == "if")
|
if (tok && tok->str() == "if")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (!tok) {
|
||||||
|
ExecutionPath::bailOut(newchecks);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// there is no "if"..
|
// there is no "if"..
|
||||||
ExecutionPath::checkScope(tok->next(), checks);
|
ExecutionPath::checkScope(tok->next(), checks);
|
||||||
tok = tok->link();
|
tok = tok->link();
|
||||||
|
|
Loading…
Reference in New Issue