diff --git a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationPlotCollection.cpp b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationPlotCollection.cpp index 009edb9768..5be23d6fd9 100644 --- a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationPlotCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationPlotCollection.cpp @@ -275,7 +275,8 @@ void RimCorrelationPlotCollection::applyEnsembleFieldAndTimeStepToPlot( RimAbstr { curveDefs.push_back( RiaSummaryCurveDefinition( ensemble, address ) ); 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 );