mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
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:
parent
debf15bbbe
commit
6864888591
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user