From 9242cb0dc5f8588f6e94c7de1e543c3cb4f6a9e8 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Sun, 30 Aug 2020 07:43:00 -0700 Subject: [PATCH] Fixed null access with ambiguous virtual method match --- 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 5572f13e..8f4605cb 100644 --- a/IDEHelper/Compiler/BfExprEvaluator.cpp +++ b/IDEHelper/Compiler/BfExprEvaluator.cpp @@ -1345,7 +1345,7 @@ bool BfMethodMatcher::CheckMethod(BfTypeInstance* targetTypeInstance, BfTypeInst { BfVirtualMethodEntry& vEntry = targetTypeInstance->mVirtualMethodTable[methodInstance->mVirtualTableIdx]; auto implMethod = (BfMethodInstance*)vEntry.mImplementingMethod; - if (implMethod != methodInstance) + if ((implMethod != methodInstance) && (implMethod != NULL)) { SetAndRestoreValue prevBypassVirtual(mBypassVirtual, true); return CheckMethod(targetTypeInstance, implMethod->GetOwner(), implMethod->mMethodDef, isFailurePass);