From 9a41e1c1341d96d86e6c6ac027300f40c58d7757 Mon Sep 17 00:00:00 2001 From: Rebecca Cox Date: Fri, 5 Jan 2018 11:11:27 +0100 Subject: [PATCH] #2321 Avoid crash when opening a project file with a PLT/RFT plot and where main plot window was closed before saving --- ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp index f45bc00b1e..b6a9d41bcb 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp @@ -725,8 +725,12 @@ void RimWellLogTrack::updateXZoom() if (!m_isAutoScaleXEnabled()) { - m_wellLogTrackPlotWidget->setXRange(m_visibleXRangeMin, m_visibleXRangeMax); - m_wellLogTrackPlotWidget->replot(); + if (m_wellLogTrackPlotWidget) + { + m_wellLogTrackPlotWidget->setXRange(m_visibleXRangeMin, m_visibleXRangeMax); + m_wellLogTrackPlotWidget->replot(); + } + return; }