From 0fbcccdc4b846d47d3bd1db48b37b4acd785ec87 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Mon, 25 Sep 2023 10:41:22 +0200 Subject: [PATCH] Guard null pointer --- .../ProjectDataModel/Summary/RimSummaryPlot.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.cpp index 149c5b0c0e..66dfb20a8a 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.cpp @@ -644,7 +644,11 @@ void RimSummaryPlot::copyAxisPropertiesFromOther( RiaDefines::PlotAxis plotAxisT QString data = ap->writeObjectToXmlString(); - axisPropertiesForPlotAxis( ap->plotAxis() )->readObjectFromXmlString( data, caf::PdmDefaultObjectFactory::instance() ); + auto axisProperty = axisPropertiesForPlotAxis( ap->plotAxis() ); + if ( axisProperty ) + { + axisProperty->readObjectFromXmlString( data, caf::PdmDefaultObjectFactory::instance() ); + } } }