From e47ce74d25f283593b8a8c1c7770184200db511c Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Wed, 5 Mar 2025 14:59:50 -0800 Subject: [PATCH] Null invoke check on deleted type --- IDEHelper/Compiler/BfExprEvaluator.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/IDEHelper/Compiler/BfExprEvaluator.cpp b/IDEHelper/Compiler/BfExprEvaluator.cpp index 019f0fec..19e1825a 100644 --- a/IDEHelper/Compiler/BfExprEvaluator.cpp +++ b/IDEHelper/Compiler/BfExprEvaluator.cpp @@ -10594,6 +10594,11 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp ((typeConstraint->IsDelegate()) || (typeConstraint->IsFunction()))) { BfMethodInstance* invokeMethodInstance = mModule->GetRawMethodInstanceAtIdx(typeConstraint->ToTypeInstance(), 0, "Invoke"); + if (invokeMethodInstance == NULL) + { + mModule->InternalError("Get Invoke failed", targetSrc); + return BfTypedValue(); + } methodDef = invokeMethodInstance->mMethodDef; methodMatcher.mBestMethodInstance = invokeMethodInstance;