1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixed error

This commit is contained in:
Brian Fiete 2022-01-04 08:12:03 -05:00
parent 8a4bf7ac8c
commit ae2c12d974

View file

@ -19524,7 +19524,7 @@ void BfExprEvaluator::DoMemberReference(BfMemberReferenceExpression* memberRefEx
{ {
if (mModule->PreFail()) if (mModule->PreFail())
{ {
if ((thisValue.mType->IsPointer()) && (thisValue.mType->GetUnderlyingType()->IsObjectOrInterface())) if ((thisValue) && (thisValue.mType->IsPointer()) && (thisValue.mType->GetUnderlyingType()->IsObjectOrInterface()))
mModule->Fail(StrFormat("Members cannot be referenced on type '%s' because the type is a pointer to a reference type (ie: a double-reference).", mModule->Fail(StrFormat("Members cannot be referenced on type '%s' because the type is a pointer to a reference type (ie: a double-reference).",
mModule->TypeToString(thisValue.mType).c_str()), nameRefNode); mModule->TypeToString(thisValue.mType).c_str()), nameRefNode);
else if (thisValue) else if (thisValue)