#4655 Python Fix crash when streaming properties to ResInsight

This commit is contained in:
Gaute Lindkvist
2019-09-02 15:12:07 +02:00
parent 7ab9b2a889
commit 551e459942
2 changed files with 24 additions and 22 deletions

View File

@@ -437,7 +437,12 @@ const RigActiveCellInfo* RigCaseCellResultsData::activeCellInfo() const
//--------------------------------------------------------------------------------------------------
void RigCaseCellResultsData::recalculateStatistics(const RigEclipseResultAddress& resVarAddr)
{
m_statisticsDataCache[findScalarResultIndexFromAddress(resVarAddr)]->clearAllStatistics();
size_t scalarResultIndex = findScalarResultIndexFromAddress(resVarAddr);
CVF_TIGHT_ASSERT(scalarResultIndex < m_cellScalarResults.size());
if (scalarResultIndex < m_cellScalarResults.size())
{
m_statisticsDataCache[scalarResultIndex]->clearAllStatistics();
}
}
//--------------------------------------------------------------------------------------------------