Fixed Cppcheck warning about possible null pointer dereference
This commit is contained in:
parent
dfde9772e2
commit
58e26ab1fc
|
@ -1125,6 +1125,8 @@ void CheckBufferOverrun::checkGlobalAndLocalVariable()
|
||||||
{
|
{
|
||||||
while (tok && tok->str() != ";")
|
while (tok && tok->str() != ";")
|
||||||
tok = tok->next();
|
tok = tok->next();
|
||||||
|
if (!tok)
|
||||||
|
break;
|
||||||
checkScope(tok, arrayInfo);
|
checkScope(tok, arrayInfo);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue