From 3480aba35bb71af8939da0dba94f191419003091 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 21 Jul 2020 14:09:46 -0500 Subject: [PATCH] Fix crash when typeScope is missing --- lib/astutils.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/astutils.cpp b/lib/astutils.cpp index 4be2f8c7b..0925078ae 100644 --- a/lib/astutils.cpp +++ b/lib/astutils.cpp @@ -1320,6 +1320,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())