xml dump: Fixed segfault when dumping symboldatabase variables

This commit is contained in:
Daniel Marjamäki 2014-07-14 19:17:39 +02:00
parent 6732556eb8
commit 84ec573d0a
1 changed files with 2 additions and 0 deletions

View File

@ -2122,6 +2122,8 @@ void SymbolDatabase::printXml(std::ostream &out) const
out << " <variables>" << std::endl;
for (unsigned int i = 1U; i < _variableList.size(); i++) {
const Variable *var = _variableList[i];
if (!var)
continue;
out << " <var id=\"" << var << '\"';
out << " nameToken=\"" << var->nameToken() << '\"';
out << " typeStartToken=\"" << var->typeStartToken() << '\"';