Merge pull request #391 from Dmitry-Me/resolveIssue1037098
Resolve CID 1037098
This commit is contained in:
commit
605fb9039a
|
@ -986,9 +986,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