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
77c789a179
commit
2aaea1e6db
@ -1172,10 +1172,11 @@ void RimSummaryMultiPlot::updatePlotVisibility()
|
||||
{
|
||||
for ( auto curve : plot->summaryAndEnsembleCurves() )
|
||||
{
|
||||
auto address = curve->valuesY();
|
||||
auto maxValue = std::max_element( address.begin(), address.end() );
|
||||
auto values = curve->valuesY();
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user