Fixed crash when printing out ValueFlow debug output

This commit is contained in:
Daniel Marjamäki 2020-01-20 08:10:39 +01:00
parent 16eae28cc9
commit 9bc43fca1d
1 changed files with 2 additions and 0 deletions

View File

@ -1550,6 +1550,8 @@ void Token::printValueFlow(bool xml, std::ostream &out) const
for (const Token *tok = this; tok; tok = tok->next()) {
if (!tok->mImpl->mValues)
continue;
if (tok->mImpl->mValues->empty()) // Values might be removed by removeContradictions
continue;
if (xml)
out << " <values id=\"" << tok->mImpl->mValues << "\">" << std::endl;
else if (line != tok->linenr())