From e1784bb37a615ad349439468a4724db29cf2dcba Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Tue, 30 May 2023 15:05:15 +0200 Subject: [PATCH] #10322 Fix crash when creating tornado Plot crash on ensemble with single realization Fixes #10322. --- .../CorrelationPlots/RimCorrelationPlotCollection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 );