Unify classEnd check for scope

This commit is contained in:
Dmitry-Me 2017-09-19 22:13:50 +03:00
parent 840c7eb258
commit 05d58f5c51
1 changed files with 4 additions and 0 deletions

View File

@ -150,6 +150,10 @@ void SymbolDatabase::createSymbolDatabaseFindAllScopes()
new_scope->classDef = tok;
new_scope->classStart = tok2;
new_scope->classEnd = tok2->link();
// make sure we have valid code
if (!new_scope->classEnd) {
_tokenizer->syntaxError(tok);
}
scope = new_scope;
tok = tok2;
} else {