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();
|
RimWellLogPlotCollection* wellLogCollection = mainPlotCollection->wellLogPlotCollection();
|
||||||
|
|
||||||
cvf::ref<RigEclipseWellLogExtractor> eclExtractor;
|
cvf::ref<RigEclipseWellLogExtractor> eclExtractor;
|
||||||
if ( m_trajectoryType == WELL_PATH )
|
|
||||||
|
if (eclipseCase)
|
||||||
{
|
{
|
||||||
eclExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, eclipseCase);
|
if (m_trajectoryType == WELL_PATH)
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (m_branchIndex >= 0 && m_branchIndex < static_cast<int>(m_generatedSimulationWellPathBranches.size()) )
|
|
||||||
{
|
{
|
||||||
eclExtractor = wellLogCollection->findOrCreateSimWellExtractor(m_simWellName,
|
eclExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, eclipseCase);
|
||||||
eclipseCase->caseUserDescription(),
|
}
|
||||||
m_generatedSimulationWellPathBranches[m_branchIndex].p(),
|
else
|
||||||
eclipseCase->eclipseCaseData());
|
{
|
||||||
isUsingPseudoLength = true;
|
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);
|
cvf::ref<RigGeoMechWellLogExtractor> geomExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, geomCase);
|
||||||
@ -335,7 +339,7 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
|||||||
|
|
||||||
RiaDefines::DepthUnitType depthUnit = RiaDefines::UNIT_METER;
|
RiaDefines::DepthUnitType depthUnit = RiaDefines::UNIT_METER;
|
||||||
|
|
||||||
if (eclExtractor.notNull())
|
if (eclExtractor.notNull() && eclipseCase)
|
||||||
{
|
{
|
||||||
measuredDepthValues = eclExtractor->measuredDepth();
|
measuredDepthValues = eclExtractor->measuredDepth();
|
||||||
tvDepthValues = eclExtractor->trueVerticalDepth();
|
tvDepthValues = eclExtractor->trueVerticalDepth();
|
||||||
|
@ -465,8 +465,10 @@ RifReaderEclipseRft* RimWellLogRftCurve::rftReader() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigEclipseWellLogExtractor* RimWellLogRftCurve::extractor()
|
RigEclipseWellLogExtractor* RimWellLogRftCurve::extractor()
|
||||||
{
|
{
|
||||||
|
if (!m_eclipseResultCase()) return nullptr;
|
||||||
RifReaderEclipseRft* reader = rftReader();
|
RifReaderEclipseRft* reader = rftReader();
|
||||||
if (!reader) return nullptr;
|
if (!reader) return nullptr;
|
||||||
|
|
||||||
|
|
||||||
RimMainPlotCollection* mainPlotCollection;
|
RimMainPlotCollection* mainPlotCollection;
|
||||||
this->firstAncestorOrThisOfTypeAsserted(mainPlotCollection);
|
this->firstAncestorOrThisOfTypeAsserted(mainPlotCollection);
|
||||||
|
@ -978,7 +978,8 @@ RigEclipseWellLogExtractor* RimWellLogTrack::createSimWellExtractor(RimWellLogPl
|
|||||||
if (!wellLogCollection) return nullptr;
|
if (!wellLogCollection) return nullptr;
|
||||||
|
|
||||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(rimCase);
|
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(rimCase);
|
||||||
|
if (!eclipseCase) return nullptr;
|
||||||
|
|
||||||
RimProject* proj = RiaApplication::instance()->project();
|
RimProject* proj = RiaApplication::instance()->project();
|
||||||
std::vector<const RigWellPath*> wellPaths = proj->simulationWellBranches(simWellName);
|
std::vector<const RigWellPath*> wellPaths = proj->simulationWellBranches(simWellName);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user