diff --git a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp index 2db593ac9..fc1649d19 100644 --- a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp @@ -226,13 +226,8 @@ namespace storm { // Compute the reward vector to add in each step based on the available reward models. std::vector totalRewardVector = rewardModel.getTotalRewardVector(transitionMatrix); - // Initialize result to either the state rewards of the model or the null vector. - std::vector result; - if (rewardModel.hasStateRewards()) { - result = rewardModel.getStateRewardVector(); - } else { - result.resize(transitionMatrix.getRowGroupCount()); - } + // Initialize result to the zero vector. + std::vector result(transitionMatrix.getRowGroupCount(), storm::utility::zero()); std::unique_ptr> solver = minMaxLinearEquationSolverFactory.create(transitionMatrix); solver->repeatedMultiply(dir, result, &totalRewardVector, stepBound);