Resolve CID 1037098
This commit is contained in:
parent
263582ddbd
commit
fd9009c494
|
@ -989,9 +989,9 @@ SymbolDatabase::SymbolDatabase(const Tokenizer *tokenizer, const Settings *setti
|
|||
const std::size_t functions = functionScopes.size();
|
||||
for (std::size_t i = 0; i < functions; ++i) {
|
||||
const Scope *func = functionScopes[i];
|
||||
for (const Token *tok = func->classStart->next(); tok != func->classEnd; tok = tok->next()) {
|
||||
for (const Token *tok = func->classStart->next(); tok && tok != func->classEnd; tok = tok->next()) {
|
||||
// check for member variable
|
||||
if (tok && tok->varId() && tok->next() &&
|
||||
if (tok->varId() && tok->next() &&
|
||||
(tok->next()->str() == "." ||
|
||||
(tok->next()->str() == "[" && tok->linkAt(1)->strAt(1) == "."))) {
|
||||
const Token *tok1 = tok->next()->str() == "." ? tok->tokAt(2) : tok->linkAt(1)->tokAt(2);
|
||||
|
|
Loading…
Reference in New Issue