Tokenizer::SetVarId : Fixed segmentation fault

This commit is contained in:
Daniel Marjamäki 2008-12-12 20:25:08 +00:00
parent 6383b9d2bd
commit 0cfec3c89c
1 changed files with 1 additions and 1 deletions

View File

@ -626,7 +626,7 @@ void Tokenizer::setVarId()
// Determine name of declared variable..
const char *varname = 0;
TOKEN *tok2 = tok->next();
while ( ! TOKEN::Match( tok2, "[;[=(]" ) )
while ( tok2 && ! TOKEN::Match( tok2, "[;[=(]" ) )
{
if ( tok2->isName() )
varname = tok2->strAt(0);