From d7197b7a88d1e4a9d01c73cc7246149baec84f45 Mon Sep 17 00:00:00 2001 From: Gaute Lindkvist Date: Thu, 26 Sep 2019 08:42:43 +0200 Subject: [PATCH] Fix crashes in well log plots --- ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.cpp | 3 ++- ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.cpp index fb1969d414..60f9675b6e 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.cpp +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.cpp @@ -1050,7 +1050,8 @@ std::map> RimWellPlotTools::calculat { for ( const auto& source : selSources ) { - if ( source.sourceType() == RifDataSourceForRftPlt::SUMMARY_RFT && source.summaryCase() ) + if ( source.sourceType() == RifDataSourceForRftPlt::SUMMARY_RFT && source.summaryCase() && + source.summaryCase()->rftReader() ) { std::set wellTimeSteps = source.summaryCase()->rftReader()->availableTimeSteps( wellPathNameOrSimWellName ); diff --git a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp index 080f0eb2fd..f9ae2fa73f 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp @@ -620,7 +620,7 @@ QList RimWellLogTrack::calculateValueOptions( const caf: caf::PdmOptionItemInfo( RegionAnnotationTypeEnum::uiText( RiuPlotAnnotationTool::FORMATION_ANNOTATIONS ), RiuPlotAnnotationTool::FORMATION_ANNOTATIONS ) ); RimWellBoreStabilityPlot* wellBoreStabilityPlot = nullptr; - this->firstAncestorOrThisOfTypeAsserted( wellBoreStabilityPlot ); + this->firstAncestorOrThisOfType( wellBoreStabilityPlot ); if ( wellBoreStabilityPlot ) { options.push_back(