diff --git a/src/modelchecker/results/ExplicitQuantitativeCheckResult.cpp b/src/modelchecker/results/ExplicitQuantitativeCheckResult.cpp index 08ca016fd..0fa299321 100644 --- a/src/modelchecker/results/ExplicitQuantitativeCheckResult.cpp +++ b/src/modelchecker/results/ExplicitQuantitativeCheckResult.cpp @@ -5,6 +5,7 @@ #include "src/utility/macros.h" #include "src/utility/vector.h" #include "src/exceptions/InvalidOperationException.h" +#include "src/exceptions/InvalidAccessException.h" #include "src/adapters/CarlAdapter.h" @@ -60,6 +61,7 @@ namespace storm { if (this->isResultForAllStates()) { map_type newMap; for (auto const& element : filterTruthValues) { + STORM_LOG_THROW(element < this->getValueVector().size(), storm::exceptions::InvalidAccessException, "Invalid index in results."); newMap.emplace(element, this->getValueVector()[element]); } this->values = newMap; @@ -253,4 +255,4 @@ namespace storm { template class ExplicitQuantitativeCheckResult; #endif } -} \ No newline at end of file +}