Fix a surface collection crash in RimGeoMechView

This commit is contained in:
Gaute Lindkvist 2020-01-22 13:18:33 +01:00
parent fffc36eadb
commit bff2abe85b
2 changed files with 6 additions and 3 deletions

View File

@ -1858,7 +1858,7 @@ bool RimEclipseView::isTimeStepDependentDataVisible() const
return true;
}
if ( this->surfaceInViewCollection()->hasAnyActiveSeparateResults() )
if ( this->surfaceInViewCollection() && this->surfaceInViewCollection()->hasAnyActiveSeparateResults() )
{
return true;
}

View File

@ -321,7 +321,10 @@ void RimGeoMechView::onCreateDisplayModel()
onUpdateLegends();
m_vizLogic->updateStaticCellColors( -1 );
m_intersectionCollection->applySingleColorEffect();
m_surfaceCollection->applySingleColorEffect();
if ( m_surfaceCollection )
{
m_surfaceCollection->applySingleColorEffect();
}
m_overlayInfoConfig()->update3DInfo();
}
@ -782,7 +785,7 @@ bool RimGeoMechView::isTimeStepDependentDataVisible() const
return true;
}
if ( this->surfaceInViewCollection()->hasAnyActiveSeparateResults() )
if ( this->surfaceInViewCollection() && this->surfaceInViewCollection()->hasAnyActiveSeparateResults() )
{
return true;
}