Skip to content

Commit

Permalink
Improve robustness when importing incomplete project file
Browse files Browse the repository at this point in the history
Avoid assert, and return empty curve definition if both summary case and ensemble is undefined.
  • Loading branch information
magnesj committed Sep 2, 2024
1 parent 9deeb41 commit 74ac8d0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,12 @@ RiaSummaryCurveDefinition RimAnalysisPlotDataEntry::curveDefinition() const
{
return RiaSummaryCurveDefinition( m_summaryCase(), m_summaryAddress->address(), m_isEnsembleCurve );
}
else
else if ( m_ensemble() )
{
CAF_ASSERT( m_ensemble() );
return RiaSummaryCurveDefinition( m_ensemble(), m_summaryAddress->address() );
}

return {};
}

//--------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 74ac8d0

Please sign in to comment.