Check for valid index before accessing data

p4#: 21957
This commit is contained in:
Magne Sjaastad 2013-06-18 12:55:49 +02:00
parent 5db88f4e03
commit c8a537e180

View File

@ -252,6 +252,11 @@ void RigSingleWellResultsData::computeStaticWellCellPath()
for (bIt = staticWellBranches.begin(); bIt != staticWellBranches.end(); ++bIt)
{
if (bIt->first >= m_wellCellsTimeSteps[0].m_wellResultBranches.size())
{
continue;
}
// Copy from first time step
RigWellResultBranch rigBranch = m_wellCellsTimeSteps[0].m_wellResultBranches[bIt->first];
rigBranch.m_branchIndex = bIt->first;