From 2af4468b4db21561d1e960bee1c73497b7f5044b Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Mon, 1 Nov 2021 07:37:07 -0700 Subject: [PATCH] Fixed field lookup crash with null mCurMethodInstance --- IDEHelper/Compiler/BfExprEvaluator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IDEHelper/Compiler/BfExprEvaluator.cpp b/IDEHelper/Compiler/BfExprEvaluator.cpp index de8eed6f..c320baf7 100644 --- a/IDEHelper/Compiler/BfExprEvaluator.cpp +++ b/IDEHelper/Compiler/BfExprEvaluator.cpp @@ -4213,7 +4213,7 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar } } - if (mModule->mCurMethodInstance->mIsUnspecialized) + if ((mModule->mCurMethodInstance != NULL) && (mModule->mCurMethodInstance->mIsUnspecialized)) { if (genericParamInst->mTypeConstraint != NULL) target.mType = genericParamInst->mTypeConstraint;