Browse Source

Fixed attempted const evaluation of case expression

Brian Fiete 5 years ago
parent
commit
c9b547dc88
1 changed files with 1 additions and 1 deletions
  1. 1 1
      IDEHelper/Compiler/BfExprEvaluator.cpp

+ 1 - 1
IDEHelper/Compiler/BfExprEvaluator.cpp

@@ -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))