mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Guard use of pointers
This commit is contained in:
@@ -214,7 +214,7 @@ bool Rim2dIntersectionView::isTimeStepDependentDataVisible() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void Rim2dIntersectionView::update3dInfo()
|
void Rim2dIntersectionView::update3dInfo()
|
||||||
{
|
{
|
||||||
if ( !nativeOrOverrideViewer() ) return;
|
if ( !nativeOrOverrideViewer() || !m_intersection ) return;
|
||||||
|
|
||||||
QString overlayInfoText;
|
QString overlayInfoText;
|
||||||
|
|
||||||
@@ -605,6 +605,8 @@ void Rim2dIntersectionView::onCreateDisplayModel()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void Rim2dIntersectionView::onUpdateDisplayModelForCurrentTimeStep()
|
void Rim2dIntersectionView::onUpdateDisplayModelForCurrentTimeStep()
|
||||||
{
|
{
|
||||||
|
if ( !m_intersection ) return;
|
||||||
|
|
||||||
update3dInfo();
|
update3dInfo();
|
||||||
onUpdateLegends();
|
onUpdateLegends();
|
||||||
|
|
||||||
@@ -682,7 +684,7 @@ void Rim2dIntersectionView::onUpdateLegends()
|
|||||||
{
|
{
|
||||||
m_legendObjectToSelect = nullptr;
|
m_legendObjectToSelect = nullptr;
|
||||||
|
|
||||||
if ( !nativeOrOverrideViewer() ) return;
|
if ( !nativeOrOverrideViewer() || !m_intersection ) return;
|
||||||
|
|
||||||
nativeOrOverrideViewer()->removeAllColorLegends();
|
nativeOrOverrideViewer()->removeAllColorLegends();
|
||||||
|
|
||||||
@@ -877,7 +879,7 @@ void Rim2dIntersectionView::defineUiOrdering( QString uiConfigName, caf::PdmUiOr
|
|||||||
|
|
||||||
uiOrdering.skipRemainingFields( true );
|
uiOrdering.skipRemainingFields( true );
|
||||||
|
|
||||||
if ( m_intersection->hasDefiningPoints() )
|
if ( m_intersection && m_intersection->hasDefiningPoints() )
|
||||||
{
|
{
|
||||||
caf::PdmUiGroup* plGroup = uiOrdering.addNewGroup( "Defining Points" );
|
caf::PdmUiGroup* plGroup = uiOrdering.addNewGroup( "Defining Points" );
|
||||||
plGroup->add( &m_showDefiningPoints );
|
plGroup->add( &m_showDefiningPoints );
|
||||||
|
Reference in New Issue
Block a user