Class Checking: Fixed AV in FindClassFunction

This commit is contained in:
Daniel Marjamäki 2008-11-02 12:48:45 +00:00
parent f1330c3db0
commit 7d234fd5c2
1 changed files with 4 additions and 1 deletions

View File

@ -113,7 +113,7 @@ static const TOKEN * FindClassFunction( const TOKEN *tok, const char classname[]
_classname[0] = classname;
_funcname[0] = funcname;
if ( indentlevel < 0 )
if ( indentlevel < 0 || tok == NULL )
return NULL;
for ( ;tok; tok = tok->next )
@ -148,6 +148,9 @@ static const TOKEN * FindClassFunction( const TOKEN *tok, const char classname[]
break;
}
}
if ( tok == NULL )
return NULL;
continue;
}
}