diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 37edde5188..f1f4c728cc 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -3324,6 +3324,11 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point) // FIXME: we should be able to transfer these to new curves smoothly // auto geo = getGeometry(GeoId); const auto* geoAsCurve = getGeometry(GeoId); + + if (geoAsCurve == nullptr) { + return -1; + } + bool isOriginalCurveConstruction = GeometryFacade::getConstruction(geoAsCurve); //******************* Step A => Detection of intersection - Common to all Geometries