#14161 Fix crash in sim well centerline from null eclipse case

calculateWellPipeStaticCenterline dereferenced eclipseView->eclipseCase()
without checking for null. When the view has no eclipse case (or no case
data), calling eclipseCaseData() on the null RimEclipseCase segfaulted
during a timestep frame change that redraws simulation well pipes.

Add the same null guard already used by the sibling method
RimSimWellInView::wellHeadTopBottomPosition, returning early so no pipe
geometry is produced when there is no case data.
This commit is contained in:
Magne Sjaastad authored and Kristian Bendiksen committed 2026-06-10 08:45:53 +02:00
1 parent 093ee4f765
commit 25921d1169
1 file changed
+2
@@ -129,6 +129,8 @@ void RigSimulationWellCenterLineCalculator::calculateWellPipeStaticCenterline( c
auto eclipseView = rimWell->firstAncestorOrThisOfTypeAsserted<RimEclipseView>();
if ( !eclipseView->eclipseCase() || !eclipseView->eclipseCase()->eclipseCaseData() ) return;
RigEclipseCaseData* eclipseCaseData = eclipseView->eclipseCase()->eclipseCaseData();
bool isAutoDetectBranches = eclipseView->wellCollection()->isAutoDetectingBranches();