mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 15:10:22 -05:00
#14451 Guard against well path without geometry
RigWellPath::interpolatedVectorValuesAlongWellPath indexed vectorValuesAlongWellPath.at( vxIdx - 1 ) when no measured depths were present, causing an out of range exception and terminate. Return cvf::Vec3d::UNDEFINED for empty geometry, matching tangentAlongWellPath. RimWellPathFracture keeps the zero anchor position when the point is undefined.
This commit is contained in:
1 parent
dd16739a37
commit
8b07cee36d
4 files changed
+58
-1
No files matched your search
@@ -207,6 +207,8 @@ cvf::Vec3d RigWellPath::interpolatedVectorValuesAlongWellPath( const std::vector
|
||||
|
||||
if ( horizontalLengthAlongWellToStartClipPoint ) *horizontalLengthAlongWellToStartClipPoint = 0.0;
|
||||
|
||||
if ( m_measuredDepths.empty() || vectorValuesAlongWellPath.empty() ) return cvf::Vec3d::UNDEFINED;
|
||||
|
||||
size_t vxIdx = 0;
|
||||
while ( vxIdx < m_measuredDepths.size() && m_measuredDepths.at( vxIdx ) < measuredDepth )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user