1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Fixed 'unable to find member' null ptr crash

This commit is contained in:
Brian Fiete 2022-01-22 06:01:31 -05:00
parent 939d05e401
commit 987413a691

View file

@ -10204,12 +10204,13 @@ void BfExprEvaluator::LookupQualifiedStaticField(BfAstNode* nameNode, BfIdentifi
}
}
mResult = LookupField(nameRight, mResult, fieldName);
auto leftResult = mResult;
mResult = LookupField(nameRight, leftResult, fieldName);
if ((mResult) || (mPropDef != NULL))
return;
mModule->CheckTypeRefFixit(nameLeft);
mModule->Fail(StrFormat("Unable to find member '%s' in '%s'", fieldName.c_str(), mModule->TypeToString(mResult.mType).c_str()), nameRight);
mModule->Fail(StrFormat("Unable to find member '%s' in '%s'", fieldName.c_str(), mModule->TypeToString(leftResult.mType).c_str()), nameRight);
}
void BfExprEvaluator::Visit(BfQualifiedNameNode* nameNode)