GeoMechView: Fix crash when case is missing.

This commit is contained in:
Kristian Bendiksen 2023-10-16 11:24:20 +02:00
parent 8930b5b32d
commit e7eb460737

View File

@ -801,6 +801,10 @@ void RimGeoMechView::onClampCurrentTimestep()
{
maxSteps = m_geomechCase->geoMechData()->femPartResults()->totalSteps();
}
else
{
return;
}
if ( m_currentTimeStep >= maxSteps ) m_currentTimeStep = maxSteps - 1;
if ( m_currentTimeStep < 0 ) m_currentTimeStep = 0;