mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 15:10:22 -05:00
#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:
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();
|
||||
|
||||
|
||||
Reference in new issue
Block a user