Add CAF_ASSERT to RigCaseCellResultsData::statistics

* Currently the code crashes in a dual porosity case.
* This commit doesn't fix the problem but adds an assert which triggers instead of just crashing
This commit is contained in:
Gaute Lindkvist 2019-05-27 14:10:21 +02:00
parent debf15bbbe
commit 6864888591

View File

@ -2808,7 +2808,9 @@ void RigCaseCellResultsData::assignValuesToTemporaryLgrs(const QString& re
//--------------------------------------------------------------------------------------------------
RigStatisticsDataCache* RigCaseCellResultsData::statistics(const RigEclipseResultAddress& resVarAddr)
{
return m_statisticsDataCache[findScalarResultIndexFromAddress(resVarAddr)].p();
size_t scalarResultIndex = findScalarResultIndexFromAddress(resVarAddr);
CAF_ASSERT(scalarResultIndex < m_statisticsDataCache.size());
return m_statisticsDataCache[scalarResultIndex].p();
}