From: azv Date: Wed, 8 Apr 2015 10:33:08 +0000 (+0300) Subject: Update constraint Rigid to work correctly with incorrect data X-Git-Tag: V_1.1.0~54^2~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1b559c7ffa9ddc2e44376781984a4947e4441304;p=modules%2Fshaper.git Update constraint Rigid to work correctly with incorrect data --- 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) {