From 1b559c7ffa9ddc2e44376781984a4947e4441304 Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 8 Apr 2015 13:33:08 +0300 Subject: [PATCH] Update constraint Rigid to work correctly with incorrect data --- src/SketchSolver/SketchSolver_ConstraintRigid.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/SketchSolver/SketchSolver_ConstraintRigid.cpp b/src/SketchSolver/SketchSolver_ConstraintRigid.cpp index a1deb96cc..6c1875ccb 100644 --- a/src/SketchSolver/SketchSolver_ConstraintRigid.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintRigid.cpp @@ -117,6 +117,11 @@ void SketchSolver_ConstraintRigid::getAttributes( myFeatureMap[myBaseFeature] = anEntityID; } + if (anEntityID == SLVS_E_UNKNOWN) { + myErrorMsg = SketchSolver_Error::NOT_INITIALIZED(); + return; + } + // Check the entity is complex Slvs_Entity anEntity = myStorage->getEntity(anEntityID); if (anEntity.point[0] != SLVS_E_UNKNOWN) { -- 2.39.2