From fc535d6d746798b7e60a11eee8f3655518c896ee Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Mon, 16 Dec 2019 13:02:31 +0100 Subject: [PATCH] #5225 Plot Template: Fix crash when selecting directory instead of template item --- .../PlotTemplateCommands/RicSelectPlotTemplateUi.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ApplicationCode/Commands/PlotTemplateCommands/RicSelectPlotTemplateUi.cpp b/ApplicationCode/Commands/PlotTemplateCommands/RicSelectPlotTemplateUi.cpp index 46e9b453fe..97a4ab9dcd 100644 --- a/ApplicationCode/Commands/PlotTemplateCommands/RicSelectPlotTemplateUi.cpp +++ b/ApplicationCode/Commands/PlotTemplateCommands/RicSelectPlotTemplateUi.cpp @@ -55,7 +55,10 @@ std::vector RicSelectPlotTemplateUi::selectedPlotTempl for ( const auto& a : m_selectedPlotTemplates() ) { - objs.push_back( a ); + if ( a ) + { + objs.push_back( a ); + } } return objs;