diff --git a/src/storm/logic/RewardAccumulationEliminationVisitor.cpp b/src/storm/logic/RewardAccumulationEliminationVisitor.cpp index 2ee9150f7..7c96a0f7d 100644 --- a/src/storm/logic/RewardAccumulationEliminationVisitor.cpp +++ b/src/storm/logic/RewardAccumulationEliminationVisitor.cpp @@ -118,7 +118,7 @@ namespace storm { boost::any RewardAccumulationEliminationVisitor::visit(TotalRewardFormula const& f, boost::any const& data) const { STORM_LOG_THROW(!data.empty(), storm::exceptions::UnexpectedException, "Formula " << f << " does not seem to be a subformula of a reward operator."); auto rewName = boost::any_cast>(data); - if (f.hasRewardAccumulation() || canEliminate(f.getRewardAccumulation(), rewName)) { + if (!f.hasRewardAccumulation() || canEliminate(f.getRewardAccumulation(), rewName)) { return std::static_pointer_cast(std::make_shared()); } else { return std::static_pointer_cast(std::make_shared(f.getRewardAccumulation()));