Merge pull request #2720 from pfultz2/crash-type-scope
Fix crash when typeScope is missing
This commit is contained in:
commit
f4a6f8ad07
|
@ -1331,6 +1331,8 @@ static const Variable* getArgumentVar(const Token* tok, int argnr)
|
|||
if (!type)
|
||||
return nullptr;
|
||||
const Scope* typeScope = type->classScope;
|
||||
if (!typeScope)
|
||||
return nullptr;
|
||||
const int argCount = numberOfArguments(tok);
|
||||
for (const Function &function : typeScope->functionList) {
|
||||
if (function.isConstructor())
|
||||
|
|
Loading…
Reference in New Issue