diff --git a/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp b/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp index 3162f9a8d9..f207f42c57 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp @@ -101,7 +101,8 @@ RimWellLogPlot::~RimWellLogPlot() //-------------------------------------------------------------------------------------------------- void RimWellLogPlot::updateViewerWidget() { - RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow(); + RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->mainPlotWindow(); + if (!mainPlotWindow) return; if (m_showWindow()) { diff --git a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp index 428887f718..c69c291c65 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp @@ -236,11 +236,9 @@ void RimWellLogTrack::availableDepthRange(double* minimumDepth, double* maximumD //-------------------------------------------------------------------------------------------------- void RimWellLogTrack::loadDataAndUpdate() { - CVF_ASSERT(m_wellLogTrackPlotWidget); - RimWellLogPlot* wellLogPlot; firstAncestorOrThisOfType(wellLogPlot); - if (wellLogPlot) + if (wellLogPlot && m_wellLogTrackPlotWidget) { m_wellLogTrackPlotWidget->setDepthTitle(wellLogPlot->depthPlotTitle()); }