mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 14:40:26 -05:00
#14168 Fix crash creating grid statistics plot for result without statistics cache entry
When creating a grid statistics plot from a view result whose address is valid by name but not present in the case result cache, statistics() was indexed with UNDEFINED_SIZE_T and the CAF_ASSERT aborted. Guard the all-cells branch with hasResultEntry() so an empty histogram is produced instead.
This commit is contained in:
1 parent
f1218e527f
commit
96aceb23a7
1 file changed
+1
-1
@@ -252,7 +252,7 @@ RigHistogramData RimHistogramCalculator::histogramData( RimEclipseView*
|
||||
{
|
||||
RigEclipseResultAddress eclResAddr = eclResultDefinition->eclipseResultAddress();
|
||||
RigCaseCellResultsData* cellResults = eclResultDefinition->currentGridCellResults();
|
||||
if ( cellResults && eclResAddr.isValid() )
|
||||
if ( cellResults && eclResAddr.isValid() && cellResults->hasResultEntry( eclResAddr ) )
|
||||
{
|
||||
if ( timeRange == StatisticsTimeRangeType::ALL_TIMESTEPS )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user