mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Guard time step index
This commit is contained in:
parent
b7aebbb392
commit
a29f325125
@ -140,9 +140,12 @@ std::vector<std::vector<double>> RigStimPlanFractureDefinition::getDataAtTimeInd
|
|||||||
size_t resIndex = resultIndex(resultName, unit);
|
size_t resIndex = resultIndex(resultName, unit);
|
||||||
|
|
||||||
if (resIndex != cvf::UNDEFINED_SIZE_T)
|
if (resIndex != cvf::UNDEFINED_SIZE_T)
|
||||||
|
{
|
||||||
|
if (timeStepIndex < stimPlanData[resIndex].parameterValues.size())
|
||||||
{
|
{
|
||||||
return stimPlanData[resIndex].parameterValues[timeStepIndex];
|
return stimPlanData[resIndex].parameterValues[timeStepIndex];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
qDebug() << "ERROR: Requested parameter does not exists in stimPlan data";
|
qDebug() << "ERROR: Requested parameter does not exists in stimPlan data";
|
||||||
std::vector<std::vector<double>> emptyVector;
|
std::vector<std::vector<double>> emptyVector;
|
||||||
|
Loading…
Reference in New Issue
Block a user