From a29f3251253a46eb78fd183efa6a868d218462ad Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Mon, 20 Feb 2017 10:04:21 +0100 Subject: [PATCH] Guard time step index --- .../ReservoirDataModel/RigStimPlanFractureDefinition.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ApplicationCode/ReservoirDataModel/RigStimPlanFractureDefinition.cpp b/ApplicationCode/ReservoirDataModel/RigStimPlanFractureDefinition.cpp index 962fb0d378..877cd07133 100644 --- a/ApplicationCode/ReservoirDataModel/RigStimPlanFractureDefinition.cpp +++ b/ApplicationCode/ReservoirDataModel/RigStimPlanFractureDefinition.cpp @@ -141,7 +141,10 @@ std::vector> RigStimPlanFractureDefinition::getDataAtTimeInd if (resIndex != cvf::UNDEFINED_SIZE_T) { - return stimPlanData[resIndex].parameterValues[timeStepIndex]; + if (timeStepIndex < stimPlanData[resIndex].parameterValues.size()) + { + return stimPlanData[resIndex].parameterValues[timeStepIndex]; + } } qDebug() << "ERROR: Requested parameter does not exists in stimPlan data";