1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Null type check on EmitTypeBody

This commit is contained in:
Brian Fiete 2022-02-22 21:44:12 -08:00
parent fefed0948e
commit 6f8ee9aef0

View file

@ -5305,7 +5305,7 @@ bool CeContext::Execute(CeFunction* startFunction, uint8* startStackPtr, uint8*
{
int32 typeId = *(int32*)((uint8*)stackPtr);
addr_ce strViewPtr = *(addr_ce*)((uint8*)stackPtr + sizeof(int32));
if ((mCurEmitContext == NULL) || (mCurEmitContext->mType->mTypeId != typeId))
if ((mCurEmitContext == NULL) || (mCurEmitContext->mType == NULL) || (mCurEmitContext->mType->mTypeId != typeId))
{
_Fail("Code cannot be emitted for this type in this context");
return false;