diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 7061b1b02..3153f830d 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -130,8 +130,9 @@ void SymbolDatabase::createSymbolDatabaseFindAllScopes() // goto initial '{' if (!new_scope->definedType) { _tokenizer->syntaxError(nullptr); // #6808 - tok2 = new_scope->definedType->initBaseInfo(tok, tok2); + break; } + tok2 = new_scope->definedType->initBaseInfo(tok, tok2); // make sure we have valid code if (!tok2) { break;