mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 15:26:48 -06:00
Made cell visibility check more robust
This commit is contained in:
parent
2b068676c5
commit
7c8fe47683
@ -197,7 +197,9 @@ bool RimEclipseWell::calculateWellPipeVisibility(size_t frameIndex)
|
||||
if (gridIndex != cvf::UNDEFINED_SIZE_T && gridCellIndex != cvf::UNDEFINED_SIZE_T)
|
||||
{
|
||||
cvf::cref<cvf::UByteArray> cellVisibility = rvMan->cellVisibility(visGridParts[gpIdx], gridIndex, frameIndex);
|
||||
if ((*cellVisibility)[gridCellIndex])
|
||||
if ((*cellVisibility).size() > 0 &&
|
||||
(*cellVisibility).size() - 1 < gridCellIndex &&
|
||||
(*cellVisibility)[gridCellIndex])
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user