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")
|
||||
continue;
|
||||
|
||||
if (!tok) {
|
||||
ExecutionPath::bailOut(newchecks);
|
||||
return;
|
||||
}
|
||||
|
||||
// there is no "if"..
|
||||
ExecutionPath::checkScope(tok->next(), checks);
|
||||
tok = tok->link();
|
||||
|
|
Loading…
Reference in New Issue