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

Fixed comptime reflection crash with static append fields

This commit is contained in:
Brian Fiete 2022-07-10 16:52:28 -04:00
parent 41a8ffb81e
commit 7244150dae

View file

@ -5754,7 +5754,7 @@ BfIRValue BfModule::CreateFieldData(BfFieldInstance* fieldInstance, int customAt
{
if (refVal.IsAddr())
constValue = mBfIRBuilder->CreatePtrToInt(refVal.mValue, BfTypeCode_IntPtr);
else if (fieldInstance->IsAppendedObject())
else if ((fieldInstance->IsAppendedObject()) && (refVal))
constValue = mBfIRBuilder->CreatePtrToInt(refVal.mValue, BfTypeCode_IntPtr);
}
}