From 1c67ab7be2c3f126f12501d4ee02534d4f6e9ea1 Mon Sep 17 00:00:00 2001 From: Valentin Rusu Date: Mon, 18 Aug 2025 15:36:49 +0300 Subject: [PATCH] Fix segfault where DatumLine does not have a refSubSHape --- src/Mod/Sketcher/App/SketchObject.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index fa75364cf6..4c01a16039 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -8879,7 +8879,7 @@ void SketchObject::rebuildExternalGeometry(std::optional extToAdd "Datum feature type is not yet supported as external geometry for a sketch"); } - if (projection) { + if (projection && !refSubShape.IsNull()) { switch (refSubShape.ShapeType()) { case TopAbs_FACE: { processFace(invRot, invPlm, mov, sketchPlane, gPlane, sketchAx3, aProjFace, geos, refSubShape); @@ -8905,7 +8905,7 @@ void SketchObject::rebuildExternalGeometry(std::optional extToAdd } int projSize = geos.size(); - if (intersection) { + if (intersection && !refSubShape.IsNull()) { FCBRepAlgoAPI_Section maker(refSubShape, sketchPlane); maker.Approximation(Standard_True); if (!maker.IsDone())