From bce29354eaf4589c924167ba831cb2e86bb0c888 Mon Sep 17 00:00:00 2001 From: jonjenssen Date: Mon, 1 Jun 2026 14:26:38 +0200 Subject: [PATCH] Add nullptr guard when setting well parent. --- .../Commands/WellPathCommands/RicSetParentWellPathFeature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicSetParentWellPathFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicSetParentWellPathFeature.cpp index e5b653bf3d..99d4fa8e74 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicSetParentWellPathFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicSetParentWellPathFeature.cpp @@ -118,7 +118,7 @@ void RicSetParentWellPathFeature::onActionTriggered( bool isChecked ) if ( parentWellPath ) { if ( !parentWellPath->wellPathGeometry() || parentWellPath->wellPathGeometry()->measuredDepths().size() < 2 ) return; - if ( selectedWellPath->wellPathGeometry()->wellPathPoints().empty() ) return; + if ( !selectedWellPath->wellPathGeometry() || selectedWellPath->wellPathGeometry()->wellPathPoints().empty() ) return; auto headOfLateral = selectedWellPath->wellPathGeometry()->wellPathPoints().front();