Janitor: Check if bounding box is valid before use

This commit is contained in:
Magne Sjaastad 2021-05-27 09:19:24 +02:00
parent 57cd46c4e2
commit 73551b0ec8

View File

@ -767,10 +767,11 @@ caf::AppEnum<RiaDefines::EclipseUnitSystem> RimWellPathCollection::findUnitSyste
wellPathBoundingBox.add( wellPathPoint );
}
if ( caseBoundingBox.intersects( wellPathBoundingBox ) )
if ( wellPathBoundingBox.isValid() && caseBoundingBox.isValid() && caseBoundingBox.intersects( wellPathBoundingBox ) )
{
return eclipseCaseData->unitsType();
}
return RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN;
}