Guard against missing well path geometry data

This commit is contained in:
Jacob Støren 2019-12-11 10:27:49 +01:00
parent 37b32c4e8a
commit 0f9b667c55
3 changed files with 9 additions and 4 deletions

View File

@ -218,7 +218,7 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
{
std::vector<RigCompletionData> fractureCompletions;
if ( !caseToApply || !caseToApply->eclipseCaseData() )
if ( !caseToApply || !caseToApply->eclipseCaseData() || !wellPathGeometry )
{
return fractureCompletions;
}

View File

@ -87,7 +87,7 @@ std::vector<RigCompletionData>
{
std::vector<RigCompletionData> completionData;
if ( !wellPath || !wellPath->completions() )
if ( !wellPath || !wellPath->completions() || !wellPath->wellPathGeometry() )
{
return completionData;
}
@ -197,7 +197,7 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWell
const RimWellPath* wellPath,
const RicExportCompletionDataSettingsUi& settings )
{
if ( !wellPath ) return;
if ( !wellPath || !wellPath->wellPathGeometry() ) return;
// Generate data
const RigEclipseCaseData* caseData = settings.caseToApply()->eclipseCaseData();

View File

@ -1168,7 +1168,12 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
RiaEclipseUnitTools::UnitSystem unitSystem = settings.caseToApply->eclipseCaseData()->unitsType();
std::vector<RigCompletionData> completionData;
const RigActiveCellInfo* activeCellInfo = settings.caseToApply->eclipseCaseData()->activeCellInfo(
if ( !wellPath || !wellPath->wellPathGeometry() )
{
return completionData;
}
const RigActiveCellInfo* activeCellInfo = settings.caseToApply->eclipseCaseData()->activeCellInfo(
RiaDefines::MATRIX_MODEL );
if ( wellPath->perforationIntervalCollection()->isChecked() )