mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-16 07:14:09 +02:00
Added target null check in LoadProperty
This commit is contained in:
parent
c8ca955e5b
commit
891d0839f2
1 changed files with 1 additions and 1 deletions
|
@ -4799,7 +4799,7 @@ BfTypedValue BfExprEvaluator::TryArrowLookup(BfTypedValue typedValue, BfTokenNod
|
||||||
BfTypedValue BfExprEvaluator::LoadProperty(BfAstNode* targetSrc, BfTypedValue target, BfTypeInstance* typeInstance, BfPropertyDef* prop, BfLookupFieldFlags flags, BfCheckedKind checkedKind, bool isInlined)
|
BfTypedValue BfExprEvaluator::LoadProperty(BfAstNode* targetSrc, BfTypedValue target, BfTypeInstance* typeInstance, BfPropertyDef* prop, BfLookupFieldFlags flags, BfCheckedKind checkedKind, bool isInlined)
|
||||||
{
|
{
|
||||||
BfTypedValue origTarget = target;
|
BfTypedValue origTarget = target;
|
||||||
if (target.mType->IsStructPtr())
|
if ((target.mType != NULL) && (target.mType->IsStructPtr()))
|
||||||
{
|
{
|
||||||
target = mModule->LoadValue(target);
|
target = mModule->LoadValue(target);
|
||||||
target = BfTypedValue(target.mValue, target.mType->GetUnderlyingType(), target.IsReadOnly() ? BfTypedValueKind_ReadOnlyAddr : BfTypedValueKind_Addr);
|
target = BfTypedValue(target.mValue, target.mType->GetUnderlyingType(), target.IsReadOnly() ? BfTypedValueKind_ReadOnlyAddr : BfTypedValueKind_Addr);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue