diff --git a/IDEHelper/Compiler/CeMachine.cpp b/IDEHelper/Compiler/CeMachine.cpp index efaaad68..5ee68f7b 100644 --- a/IDEHelper/Compiler/CeMachine.cpp +++ b/IDEHelper/Compiler/CeMachine.cpp @@ -4335,7 +4335,7 @@ static void CeSetAddrVal(void* ptr, addr_ce val, int32 ptrSize) } bool CeContext::Execute(CeFunction* startFunction, uint8* startStackPtr, uint8* startFramePtr, BfType*& returnType) -{ +{ auto ceModule = mCeMachine->mCeModule; CeFunction* ceFunction = startFunction; returnType = startFunction->mMethodInstance->mReturnType; @@ -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; }