mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix out of bounds access
Triggered by calculations when data is missing for some time steps
This commit is contained in:
parent
5f78d5e842
commit
d26c736042
@ -2722,6 +2722,8 @@ void RigCaseCellResultsData::computeOilVolumes()
|
|||||||
{
|
{
|
||||||
size_t resultIndex = activeCellInfo()->cellResultIndex( nativeResvCellIndex );
|
size_t resultIndex = activeCellInfo()->cellResultIndex( nativeResvCellIndex );
|
||||||
if ( resultIndex != cvf::UNDEFINED_SIZE_T )
|
if ( resultIndex != cvf::UNDEFINED_SIZE_T )
|
||||||
|
{
|
||||||
|
if ( resultIndex < soilResults.size() && resultIndex < cellVolumeResults.size() )
|
||||||
{
|
{
|
||||||
CVF_ASSERT( soilResults.at( resultIndex ) <= 1.01 );
|
CVF_ASSERT( soilResults.at( resultIndex ) <= 1.01 );
|
||||||
oilVolumeResults[resultIndex] =
|
oilVolumeResults[resultIndex] =
|
||||||
@ -2729,6 +2731,7 @@ void RigCaseCellResultsData::computeOilVolumes()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user