1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Merge pull request #1712 from eveningstarinc/hunterbridges/FieldResolutionBugfix

Field resolution compiler crash fix
This commit is contained in:
Brian Fiete 2022-09-21 13:40:48 -07:00 committed by GitHub
commit 532deab0cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5000,7 +5000,12 @@ BfTypedValue BfExprEvaluator::LoadField(BfAstNode* targetSrc, BfTypedValue targe
{
if ((fieldInstance->mResolvedType == NULL) ||
(!fieldDef->mIsStatic))
{
mModule->PopulateType(typeInstance, BfPopulateType_Data);
// Update fieldInstance pointer as it may have moved
fieldInstance = &typeInstance->mFieldInstances[fieldDef->mIdx];
}
}
if (fieldInstance->mResolvedType == NULL)