From 02cce5db8d04ea27168b9786b32a1decff8c3b02 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sat, 26 Sep 2026 18:39:35 +0200 Subject: [PATCH] #14803 Fix PLT crash for MSW segments without grid cell --- ApplicationLibCode/ProjectDataModel/Flow/RimWellPltPlot.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimWellPltPlot.cpp b/ApplicationLibCode/ProjectDataModel/Flow/RimWellPltPlot.cpp index e616e0b681..9a38ef99b8 100644 --- a/ApplicationLibCode/ProjectDataModel/Flow/RimWellPltPlot.cpp +++ b/ApplicationLibCode/ProjectDataModel/Flow/RimWellPltPlot.cpp @@ -412,6 +412,9 @@ public: const std::vector branchResPoints = resFrame->branchResultPointsFromBranchIndex( brIdx ); for ( size_t wrpIdx = 0; wrpIdx < branchResPoints.size(); wrpIdx++ ) { + // MSW segments without a connection have no cell + if ( !branchResPoints[wrpIdx].isCell() ) continue; + const RigGridBase* grid = mainGrid->gridByIndex( branchResPoints[wrpIdx].gridIndex() ); size_t globalCellIndex = grid->reservoirCellIndex( branchResPoints[wrpIdx].cellIndex() );