1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Fixed crash when attempting to apply a ce field attribute to a method

This commit is contained in:
Brian Fiete 2022-05-13 12:22:30 -07:00
parent 6273c242f2
commit ebd341e311

View file

@ -2381,7 +2381,7 @@ void BfModule::HandleCEAttributes(CeEmitContext* ceEmitContext, BfTypeInstance*
for (auto& ifaceEntry : checkAttrType->mInterfaces)
{
isFieldApply = false;
isFieldApply = (ceEmitContext != NULL) && (ifaceEntry.mInterfaceType->IsInstanceOf(mCompiler->mIOnFieldInitTypeDef));
isFieldApply = (ceEmitContext != NULL) && (fieldInstance != NULL) && (ifaceEntry.mInterfaceType->IsInstanceOf(mCompiler->mIOnFieldInitTypeDef));
if ((isFieldApply) ||
((ceEmitContext != NULL) && (ifaceEntry.mInterfaceType->IsInstanceOf(mCompiler->mIComptimeTypeApply))) ||