mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Guard null pointer access
This commit is contained in:
@@ -75,7 +75,7 @@ void RiuPvtPlotUpdater::updateOnSelectionChanged( const RiuSelectionItem* select
|
||||
bool mustClearPlot = true;
|
||||
m_viewToFollowAnimationFrom = nullptr;
|
||||
|
||||
if ( m_targetPlotPanel->isVisible() && eclipseSelectionItem )
|
||||
if ( m_targetPlotPanel->isVisible() && eclipseSelectionItem && eclipseSelectionItem->m_resultDefinition )
|
||||
{
|
||||
if ( queryDataAndUpdatePlot( eclipseSelectionItem->m_resultDefinition,
|
||||
eclipseSelectionItem->m_timestepIdx,
|
||||
@@ -146,6 +146,8 @@ bool RiuPvtPlotUpdater::queryDataAndUpdatePlot( const RimEclipseResultDefinition
|
||||
{
|
||||
CVF_ASSERT( plotPanel );
|
||||
|
||||
if ( !eclipseResDef ) return false;
|
||||
|
||||
RimEclipseResultCase* eclipseResultCase = dynamic_cast<RimEclipseResultCase*>( eclipseResDef->eclipseCase() );
|
||||
RigEclipseCaseData* eclipseCaseData = eclipseResultCase ? eclipseResultCase->eclipseCaseData() : nullptr;
|
||||
if ( eclipseResultCase && eclipseCaseData && eclipseResultCase->flowDiagSolverInterface() )
|
||||
|
||||
Reference in New Issue
Block a user