From bff2abe85baf4494dcf1be346d1c290ee61c5e32 Mon Sep 17 00:00:00 2001 From: Gaute Lindkvist Date: Wed, 22 Jan 2020 13:18:33 +0100 Subject: [PATCH] Fix a surface collection crash in RimGeoMechView --- ApplicationCode/ProjectDataModel/RimEclipseView.cpp | 2 +- ApplicationCode/ProjectDataModel/RimGeoMechView.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp index eac1335c4e..183e152cd0 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp @@ -1858,7 +1858,7 @@ bool RimEclipseView::isTimeStepDependentDataVisible() const return true; } - if ( this->surfaceInViewCollection()->hasAnyActiveSeparateResults() ) + if ( this->surfaceInViewCollection() && this->surfaceInViewCollection()->hasAnyActiveSeparateResults() ) { return true; } diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp b/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp index 73ef1c1b74..baef414058 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp +++ b/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp @@ -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; }