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:
parent
2c73b2ed02
commit
cd12b3ad4b
@ -614,19 +614,25 @@ std::set<RifEclipseSummaryAddress> RimSummaryPlotSourceStepping::adressesForSour
|
||||
{
|
||||
auto curveSets = ensembleCollection->curveSetsForSourceStepping();
|
||||
for ( const RimEnsembleCurveSet* curveSet : curveSets )
|
||||
{
|
||||
if ( curveSet && curveSet->summaryCaseCollection() )
|
||||
{
|
||||
auto addresses = curveSet->summaryCaseCollection()->ensembleSummaryAddresses();
|
||||
addressSet.insert( addresses.begin(), addresses.end() );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
RimSummaryCurveCollection* curveCollection = nullptr;
|
||||
this->firstAncestorOrThisOfType( curveCollection );
|
||||
if ( curveCollection )
|
||||
{
|
||||
for ( auto curve : curveCollection->curvesForSourceStepping( m_sourceSteppingType ) )
|
||||
{
|
||||
if ( !curve ) continue;
|
||||
|
||||
if ( isYAxisStepping() && curve->summaryCaseY() && curve->summaryCaseY()->summaryReader() )
|
||||
{
|
||||
auto addresses = curve->summaryCaseY()->summaryReader()->allResultAddresses();
|
||||
@ -640,6 +646,7 @@ std::set<RifEclipseSummaryAddress> RimSummaryPlotSourceStepping::adressesForSour
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return addressSet;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user