1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Fixed field lookup crash with null mCurMethodInstance

This commit is contained in:
Brian Fiete 2021-11-01 07:37:07 -07:00
parent 483eb41c6e
commit 2af4468b4d

View file

@ -4213,7 +4213,7 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar
}
}
if (mModule->mCurMethodInstance->mIsUnspecialized)
if ((mModule->mCurMethodInstance != NULL) && (mModule->mCurMethodInstance->mIsUnspecialized))
{
if (genericParamInst->mTypeConstraint != NULL)
target.mType = genericParamInst->mTypeConstraint;