Fixed #7990 (crash: SymbolDatabase::printOut())

This commit is contained in:
Robert Reif 2017-04-29 07:02:49 +02:00 committed by Daniel Marjamäki
parent 06102cb3d7
commit 964b744c96
1 changed files with 1 additions and 1 deletions

View File

@ -2698,7 +2698,7 @@ void SymbolDatabase::printOut(const char *title) const
std::cout << " retDef: " << tokenToString(func->retDef, _tokenizer) << std::endl; std::cout << " retDef: " << tokenToString(func->retDef, _tokenizer) << std::endl;
if (func->retDef) { if (func->retDef) {
std::cout << " "; std::cout << " ";
for (const Token * tok = func->retDef; tok != func->tokenDef; tok = tok->next()) for (const Token * tok = func->retDef; tok && tok != func->tokenDef && !Token::Match(tok, "{|;"); tok = tok->next())
std::cout << " " << tokenType(tok); std::cout << " " << tokenType(tok);
std::cout << std::endl; std::cout << std::endl;
} }