Salome HOME
Update constraint Rigid to work correctly with incorrect data
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintRigid.cpp
index a1deb96ccd44516b25004ebf166363b615ae6554..6c1875ccb062394d2df1312fad8271c1aeb43626 100644 (file)
@@ -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) {