[Sketcher] Add missing check when transforming constraints for trim

Fixes https://github.com/AstoCAD/FreeCAD/issues/24.
This commit is contained in:
Ajinkya Dahale
2025-03-14 02:17:02 +05:30
committed by Benjamin Nauck
parent 18fe29d0b5
commit 32cf5fa61a

View File

@@ -3628,7 +3628,7 @@ std::unique_ptr<Constraint> transformPreexistingConstraintForTrim(const SketchOb
*/
// TODO: Symmetric and distance constraints (sometimes together) can be changed to something
std::unique_ptr<Constraint> newConstr;
if (!constr->involvesGeoId(cuttingGeoId)
if (cuttingGeoId == GeoEnum::GeoUndef || !constr->involvesGeoId(cuttingGeoId)
|| !constr->involvesGeoIdAndPosId(GeoId, PointPos::none)) {
return newConstr;
}