Fix crash when typeScope is missing
This commit is contained in:
parent
ca1fcfa8bc
commit
3480aba35b
|
@ -1320,6 +1320,8 @@ static const Variable* getArgumentVar(const Token* tok, int argnr)
|
||||||
if (!type)
|
if (!type)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
const Scope* typeScope = type->classScope;
|
const Scope* typeScope = type->classScope;
|
||||||
|
if (!typeScope)
|
||||||
|
return nullptr;
|
||||||
const int argCount = numberOfArguments(tok);
|
const int argCount = numberOfArguments(tok);
|
||||||
for (const Function &function : typeScope->functionList) {
|
for (const Function &function : typeScope->functionList) {
|
||||||
if (function.isConstructor())
|
if (function.isConstructor())
|
||||||
|
|
Loading…
Reference in New Issue