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

Fixed crash with increment/decrement error

This commit is contained in:
Brian Fiete 2020-09-25 09:57:37 -07:00
parent 4b64f2c14d
commit f6ab79d2ef

View file

@ -18385,7 +18385,6 @@ void BfExprEvaluator::PerformUnaryOperation_OnResult(BfExpression* unaryOpExpr,
constValue = mModule->GetConstValue(1, ptr.mType);
if (!constValue)
{
mResult = BfTypedValue();
numericFail = true;
break;
}
@ -18395,7 +18394,6 @@ void BfExprEvaluator::PerformUnaryOperation_OnResult(BfExpression* unaryOpExpr,
}
else
{
mResult = BfTypedValue();
numericFail = true;
break;
}
@ -18584,7 +18582,7 @@ void BfExprEvaluator::PerformUnaryOperation_OnResult(BfExpression* unaryOpExpr,
{
BF_ASSERT(mModule->mBfIRBuilder->mIgnoreWrites);
}
else if (mResult.mType->IsInterface())
else if ((mResult.mType != NULL) && (mResult.mType->IsInterface()))
{
mModule->Fail(
StrFormat("Operator '%s' cannot be used on interface '%s'. Consider rewriting using generics and use this interface as a generic constraint.",