1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 20:12:21 +02:00

Fixed null access with ambiguous virtual method match

This commit is contained in:
Brian Fiete 2020-08-30 07:43:00 -07:00
parent 047f969060
commit 9242cb0dc5

View file

@ -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<bool> prevBypassVirtual(mBypassVirtual, true);
return CheckMethod(targetTypeInstance, implMethod->GetOwner(), implMethod->mMethodDef, isFailurePass);