Tokenizer::setVarIdNew: Fixed segfault when using new setVarId on invalid code

This commit is contained in:
Daniel Marjamäki 2012-04-21 18:02:26 +02:00
parent bd60dd46d0
commit 42a95c9202
1 changed files with 1 additions and 1 deletions

View File

@ -2931,7 +2931,7 @@ void Tokenizer::setVarIdNew()
}
} else if (tok->str() == "}") {
// Set variable ids in class declaration..
if (!isC() && !executableScope.top()) {
if (!isC() && !executableScope.top() && tok->link()) {
setVarIdClassDeclaration(tok->link(), variableId, scopestartvarid.top());
}