Fix crashes when reading an odb file fails due to corruption

This commit is contained in:
Jacob Støren
2018-04-23 16:35:19 +02:00
parent 51fb8a6935
commit 54c7932806
5 changed files with 36 additions and 14 deletions

View File

@@ -215,12 +215,15 @@ QString RiuFemResultTextBuilder::formationDetails()
size_t k = cvf::UNDEFINED_SIZE_T;
{
RigGeoMechCaseData* geomData = m_reservoirView->geoMechCase()->geoMechData();
if(geomData)
if ( m_reservoirView->geoMechCase() )
{
size_t i = 0;
size_t j = 0;
geomData->femParts()->part(m_gridIndex)->structGrid()->ijkFromCellIndex(m_cellIndex, &i, &j, &k);
RigGeoMechCaseData* geomData = m_reservoirView->geoMechCase()->geoMechData();
if ( geomData )
{
size_t i = 0;
size_t j = 0;
geomData->femParts()->part(m_gridIndex)->structGrid()->ijkFromCellIndex(m_cellIndex, &i, &j, &k);
}
}
}