#10322 Fix crash when creating tornado Plot crash on ensemble with single realization

Fixes #10322.
This commit is contained in:
Kristian Bendiksen 2023-05-30 15:05:15 +02:00
parent 9745b48643
commit e1784bb37a

View File

@ -275,7 +275,8 @@ void RimCorrelationPlotCollection::applyEnsembleFieldAndTimeStepToPlot( RimAbstr
{ {
curveDefs.push_back( RiaSummaryCurveDefinition( ensemble, address ) ); curveDefs.push_back( RiaSummaryCurveDefinition( ensemble, address ) );
auto correlationSortedEnsembleParameters = ensemble->correlationSortedEnsembleParameters( address, timeStep ); auto correlationSortedEnsembleParameters = ensemble->correlationSortedEnsembleParameters( address, timeStep );
highestCorrelationParameters.push_back( correlationSortedEnsembleParameters.front().first.name ); if ( !correlationSortedEnsembleParameters.empty() )
highestCorrelationParameters.push_back( correlationSortedEnsembleParameters.front().first.name );
} }
} }
plot->setCurveDefinitions( curveDefs ); plot->setCurveDefinitions( curveDefs );