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

Fixed attempted const evaluation of case expression

This commit is contained in:
Brian Fiete 2020-09-28 12:51:33 -07:00
parent dd71b6e5c0
commit c9b547dc88

View file

@ -2850,7 +2850,7 @@ void BfExprEvaluator::Visit(BfCaseExpression* caseExpr)
if (caseValAddr.mType != NULL)
mModule->mBfIRBuilder->PopulateType(caseValAddr.mType);
if (mModule->mCurMethodState->mDeferredLocalAssignData != NULL)
if ((mModule->mCurMethodState != NULL) && (mModule->mCurMethodState->mDeferredLocalAssignData != NULL))
mModule->mCurMethodState->mDeferredLocalAssignData->BreakExtendChain();
if (auto bindExpr = BfNodeDynCast<BfEnumCaseBindExpression>(caseExpr->mCaseExpression))