mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix crash when curve data is missing
This commit is contained in:
parent
317c737a22
commit
cfb120ce2e
@ -1172,10 +1172,11 @@ void RimSummaryMultiPlot::updatePlotVisibility()
|
|||||||
{
|
{
|
||||||
for ( auto curve : plot->summaryAndEnsembleCurves() )
|
for ( auto curve : plot->summaryAndEnsembleCurves() )
|
||||||
{
|
{
|
||||||
auto address = curve->valuesY();
|
auto values = curve->valuesY();
|
||||||
auto maxValue = std::max_element( address.begin(), address.end() );
|
if ( values.empty() ) continue;
|
||||||
|
|
||||||
if ( *maxValue > limit ) return true;
|
auto maxValue = std::max_element( values.begin(), values.end() );
|
||||||
|
if ( maxValue != values.end() && ( *maxValue > limit ) ) return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user