Fixed #616 (cppcheck crashes with Eigen/src/Cholesky/CholeskyInstantiations.cpp)

http://sourceforge.net/apps/trac/cppcheck/ticket/616
This commit is contained in:
Slava Semushin 2009-08-26 23:44:01 +07:00
parent d778f67265
commit 89f9645174
1 changed files with 1 additions and 1 deletions

View File

@ -3118,7 +3118,7 @@ void Tokenizer::simplifyGoto()
std::list<Token *> gotos;
unsigned int indentlevel = 0;
Token *beginfunction = 0;
for (Token *tok = _tokens; tok; tok = tok->next())
for (Token *tok = _tokens; tok; tok = (tok ? tok->next() : NULL))
{
if (tok->str() == "{")
++indentlevel;