From ff0599df0494816f9b7edbffd45ebd283bf97fe2 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Mon, 29 Jan 2018 10:04:33 +0100 Subject: [PATCH] Guard for access of dynamic data with no time steps --- .../ReservoirDataModel/RigEclipseNativeStatCalc.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseNativeStatCalc.h b/ApplicationCode/ReservoirDataModel/RigEclipseNativeStatCalc.h index 059b5c41e7..bab42e2063 100644 --- a/ApplicationCode/ReservoirDataModel/RigEclipseNativeStatCalc.h +++ b/ApplicationCode/ReservoirDataModel/RigEclipseNativeStatCalc.h @@ -50,6 +50,11 @@ private: template void traverseCells(StatisticsAccumulator& accumulator, size_t timeStepIndex) { + if (timeStepIndex >= m_resultsData->cellScalarResults(m_scalarResultIndex).size()) + { + return; + } + std::vector& values = m_resultsData->cellScalarResults(m_scalarResultIndex, timeStepIndex); if (values.empty())