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; return true;
} }
if ( this->surfaceInViewCollection()->hasAnyActiveSeparateResults() ) if ( this->surfaceInViewCollection() && this->surfaceInViewCollection()->hasAnyActiveSeparateResults() )
{ {
return true; return true;
} }

View File

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