diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 214d25289..ea98d43cd 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -1237,9 +1237,9 @@ void SymbolDatabase::fixVarId(VarIdMap & varIds, const Token * vartok, Token * m if (membertok->varId() == 0) { varId->second.insert(std::make_pair(membervar->nameToken()->varId(), const_cast(_tokenizer)->newVarId())); _variableList.push_back(membervar); + memberId = varId->second.find(membervar->nameToken()->varId()); } else _variableList[membertok->varId()] = membervar; - memberId = varId->second.find(membervar->nameToken()->varId()); } if (membertok->varId() == 0) membertok->varId(memberId->second);