1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 23:36:00 +02:00

Better failure for invalid method instance

This commit is contained in:
Brian Fiete 2021-02-07 16:17:47 -08:00
parent 9268e3b25d
commit 5077876ef7

View file

@ -5408,6 +5408,15 @@ bool CeContext::Execute(CeFunction* startFunction, uint8* startStackPtr, uint8*
mCeMachine->PrepareFunction(callEntry.mFunction, NULL);
}
if (callEntry.mFunction->mMethodInstance != NULL)
{
if (callEntry.mFunction->mMethodInstance->GetOwner()->IsDeleting())
{
_Fail("Calling method on deleted type");
return false;
}
}
callEntry.mBindRevision = mCeMachine->mMethodBindRevision;
}