mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +02:00
Fixed field initializer crash
This commit is contained in:
parent
abeda6909b
commit
a29f22d227
1 changed files with 2 additions and 2 deletions
|
@ -3802,10 +3802,10 @@ BfTypedValue BfModule::GetFieldInitializerValue(BfFieldInstance* fieldInstance,
|
||||||
if (fieldInstance != NULL)
|
if (fieldInstance != NULL)
|
||||||
MarkFieldInitialized(fieldInstance);
|
MarkFieldInitialized(fieldInstance);
|
||||||
|
|
||||||
if (doStore)
|
if ((doStore) && (result))
|
||||||
{
|
{
|
||||||
result = LoadValue(result);
|
result = LoadValue(result);
|
||||||
if (!result.mType->IsValuelessType())
|
if (!result.mType->IsValuelessType())
|
||||||
mBfIRBuilder->CreateStore(result.mValue, staticVarRef.mValue);
|
mBfIRBuilder->CreateStore(result.mValue, staticVarRef.mValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue