CheckUninitVar: Fix Coverity warning about possible null pointer.
This commit is contained in:
parent
c8a5811b92
commit
7321f92eff
|
@ -1086,6 +1086,8 @@ void CheckUninitVar::checkScope(const Scope* scope)
|
||||||
}
|
}
|
||||||
while (tok && tok->str() != ";")
|
while (tok && tok->str() != ";")
|
||||||
tok = tok->next();
|
tok = tok->next();
|
||||||
|
if (!tok)
|
||||||
|
continue;
|
||||||
if (Token::findsimplematch(i->typeStartToken(), "=", tok))
|
if (Token::findsimplematch(i->typeStartToken(), "=", tok))
|
||||||
continue;
|
continue;
|
||||||
if (stdtype || i->isPointer()) {
|
if (stdtype || i->isPointer()) {
|
||||||
|
|
Loading…
Reference in New Issue