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

@@ -914,7 +914,9 @@ QString Rim3dOverlayInfoConfig::timeStepText(RimEclipseView* eclipseView)
QString Rim3dOverlayInfoConfig::timeStepText(RimGeoMechView* geoMechView)
{
int currTimeStepIndex = geoMechView->currentTimeStep();
QStringList timeSteps = geoMechView->geoMechCase()->timeStepStrings();
QStringList timeSteps;
if (geoMechView->geoMechCase()) timeSteps = geoMechView->geoMechCase()->timeStepStrings();
QString dateTimeString;
if (currTimeStepIndex >= 0 && currTimeStepIndex < timeSteps.size())