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() != ";")
|
||||
tok = tok->next();
|
||||
if (!tok)
|
||||
break;
|
||||
checkScope(tok, arrayInfo);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue