diff --git a/ApplicationLibCode/ReservoirDataModel/ResultCalculators/RigCellVolumeResultCalculator.cpp b/ApplicationLibCode/ReservoirDataModel/ResultCalculators/RigCellVolumeResultCalculator.cpp index 9880ee2982..1aec763cab 100644 --- a/ApplicationLibCode/ReservoirDataModel/ResultCalculators/RigCellVolumeResultCalculator.cpp +++ b/ApplicationLibCode/ReservoirDataModel/ResultCalculators/RigCellVolumeResultCalculator.cpp @@ -77,7 +77,7 @@ void RigCellVolumeResultCalculator::calculate( const RigEclipseResultAddress& re nativeResvCellIndex++ ) { size_t resultIndex = m_resultsData->activeCellInfo()->cellResultIndex( nativeResvCellIndex ); - if ( resultIndex != cvf::UNDEFINED_SIZE_T ) + if ( ( resultIndex != cvf::UNDEFINED_SIZE_T ) && ( resultIndex < cellResultCount ) ) { const RigCell& cell = m_resultsData->m_ownerMainGrid->cell( nativeResvCellIndex ); if ( !cell.subGrid() ) diff --git a/ApplicationLibCode/ReservoirDataModel/RigCaseCellResultsData.cpp b/ApplicationLibCode/ReservoirDataModel/RigCaseCellResultsData.cpp index 371e249288..12b0980f72 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigCaseCellResultsData.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigCaseCellResultsData.cpp @@ -1906,6 +1906,7 @@ void RigCaseCellResultsData::computeDepthRelatedResults() size_t resultIndex = activeCellInfo()->cellResultIndex( cellIdx ); if ( resultIndex == cvf::UNDEFINED_SIZE_T ) continue; + if ( resultIndex >= actCellCount ) continue; bool isTemporaryGrid = cell.hostGrid()->isTempGrid(); diff --git a/ThirdParty/custom-opm-common/opm-common b/ThirdParty/custom-opm-common/opm-common index 1c58d7f14a..6fdaa25164 160000 --- a/ThirdParty/custom-opm-common/opm-common +++ b/ThirdParty/custom-opm-common/opm-common @@ -1 +1 @@ -Subproject commit 1c58d7f14a9ee1eb117d90c3cc6073ffd25cc7d5 +Subproject commit 6fdaa25164ac705b48955287747c82161f0fd4d5