CheckUninitVar: Fix Coverity warning about possible null pointer.

This commit is contained in:
Daniel Marjamäki 2013-12-12 12:36:49 +01:00
parent c8a5811b92
commit 7321f92eff
1 changed files with 2 additions and 0 deletions

View File

@ -1086,6 +1086,8 @@ void CheckUninitVar::checkScope(const Scope* scope)
}
while (tok && tok->str() != ";")
tok = tok->next();
if (!tok)
continue;
if (Token::findsimplematch(i->typeStartToken(), "=", tok))
continue;
if (stdtype || i->isPointer()) {