#14437 Guard against lateral without active well targets

A lateral gets its well path geometry from the parent well, and is
visualized even when it has no active well targets. Building the well
target spheres then calls setVectors() with empty arrays, which asserts.
This commit is contained in:
Magne Sjaastad committed 2026-07-31 17:14:41 +02:00
1 parent 403450dfdf
commit 69faf4ac13
3 files changed
+55 -2

No files matched your search

@@ -928,6 +928,10 @@ void RivWellPathPartMgr::buildWellPathParts( const caf::DisplayCoordTransform* d
{
auto geoDef = modeledWellPath->geometryDefinition();
// A lateral gets its well path geometry from the parent well, and can have no active well targets
auto wellTargets = geoDef->activeWellTargets();
if ( wellTargets.empty() ) return;
auto sphereColor = geoDef->sphereColor();
double sphereRadiusFactor = geoDef->sphereRadiusFactor();
@@ -935,8 +939,6 @@ void RivWellPathPartMgr::buildWellPathParts( const caf::DisplayCoordTransform* d
cvf::ref<cvf::Vec3fArray> vecRes = new cvf::Vec3fArray;
cvf::ref<cvf::Color3fArray> colors = new cvf::Color3fArray;
auto wellTargets = geoDef->activeWellTargets();
size_t pointCount = wellTargets.size();
vertices->reserve( pointCount );
vecRes->reserve( pointCount );