mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Guard for if eclipseCaseData is null
This commit is contained in:
parent
a5300032e9
commit
32c1fa25d5
@ -312,19 +312,23 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
RimWellLogPlotCollection* wellLogCollection = mainPlotCollection->wellLogPlotCollection();
|
||||
|
||||
cvf::ref<RigEclipseWellLogExtractor> eclExtractor;
|
||||
if ( m_trajectoryType == WELL_PATH )
|
||||
|
||||
if (eclipseCase)
|
||||
{
|
||||
eclExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, eclipseCase);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_branchIndex >= 0 && m_branchIndex < static_cast<int>(m_generatedSimulationWellPathBranches.size()) )
|
||||
if (m_trajectoryType == WELL_PATH)
|
||||
{
|
||||
eclExtractor = wellLogCollection->findOrCreateSimWellExtractor(m_simWellName,
|
||||
eclipseCase->caseUserDescription(),
|
||||
m_generatedSimulationWellPathBranches[m_branchIndex].p(),
|
||||
eclipseCase->eclipseCaseData());
|
||||
isUsingPseudoLength = true;
|
||||
eclExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, eclipseCase);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_branchIndex >= 0 && m_branchIndex < static_cast<int>(m_generatedSimulationWellPathBranches.size()))
|
||||
{
|
||||
eclExtractor = wellLogCollection->findOrCreateSimWellExtractor(m_simWellName,
|
||||
eclipseCase->caseUserDescription(),
|
||||
m_generatedSimulationWellPathBranches[m_branchIndex].p(),
|
||||
eclipseCase->eclipseCaseData());
|
||||
isUsingPseudoLength = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
cvf::ref<RigGeoMechWellLogExtractor> geomExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, geomCase);
|
||||
@ -335,7 +339,7 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
|
||||
RiaDefines::DepthUnitType depthUnit = RiaDefines::UNIT_METER;
|
||||
|
||||
if (eclExtractor.notNull())
|
||||
if (eclExtractor.notNull() && eclipseCase)
|
||||
{
|
||||
measuredDepthValues = eclExtractor->measuredDepth();
|
||||
tvDepthValues = eclExtractor->trueVerticalDepth();
|
||||
|
@ -465,8 +465,10 @@ RifReaderEclipseRft* RimWellLogRftCurve::rftReader() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigEclipseWellLogExtractor* RimWellLogRftCurve::extractor()
|
||||
{
|
||||
if (!m_eclipseResultCase()) return nullptr;
|
||||
RifReaderEclipseRft* reader = rftReader();
|
||||
if (!reader) return nullptr;
|
||||
|
||||
|
||||
RimMainPlotCollection* mainPlotCollection;
|
||||
this->firstAncestorOrThisOfTypeAsserted(mainPlotCollection);
|
||||
|
@ -978,7 +978,8 @@ RigEclipseWellLogExtractor* RimWellLogTrack::createSimWellExtractor(RimWellLogPl
|
||||
if (!wellLogCollection) return nullptr;
|
||||
|
||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(rimCase);
|
||||
|
||||
if (!eclipseCase) return nullptr;
|
||||
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
std::vector<const RigWellPath*> wellPaths = proj->simulationWellBranches(simWellName);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user