#4375 Robustness : Make sure we handle missing data gracefully

This commit is contained in:
Magne Sjaastad
2019-04-26 12:50:36 +02:00
parent b35e7d9bd4
commit 11e91f5d1c
2 changed files with 21 additions and 16 deletions

View File

@@ -171,13 +171,13 @@ std::vector<const RigWellPath*> RimSimWellInView::wellPipeBranches() const
this->firstAncestorOrThisOfTypeAsserted(simWellCollection);
RimEclipseCase* eclipseCase = nullptr;
this->firstAncestorOrThisOfTypeAsserted(eclipseCase);
RigEclipseCaseData* caseData = eclipseCase->eclipseCaseData();
CVF_ASSERT(caseData);
if (caseData)
this->firstAncestorOrThisOfType(eclipseCase);
if (eclipseCase && eclipseCase->eclipseCaseData())
{
RigEclipseCaseData* caseData = eclipseCase->eclipseCaseData();
bool includeCellCenters = this->isUsingCellCenterForPipe();
bool detectBrances = simWellCollection->isAutoDetectingBranches;
bool detectBrances = simWellCollection->isAutoDetectingBranches;
return caseData->simulationWellBranches(this->name(), includeCellCenters, detectBrances);
}