Clang import: Fix null pointer dereference

This commit is contained in:
Daniel Marjamäki 2020-11-26 17:26:18 +01:00
parent 0e8556e6ed
commit 1e8eb28390
1 changed files with 1 additions and 0 deletions

View File

@ -1244,6 +1244,7 @@ void clangimport::AstNode::createTokensFunctionDecl(TokenList *tokenList)
if (hasBody) {
symbolDatabase->scopeList.push_back(Scope(nullptr, nullptr, nestedIn));
scope = &symbolDatabase->scopeList.back();
scope->check = symbolDatabase;
scope->function = function;
scope->classDef = nameToken;
scope->type = Scope::ScopeType::eFunction;