Salome HOME
A fix for the next case:
[modules/shaper.git] / src / SketchSolver / SketchSolver_Constraint.cpp
index efd447ab793487449238d027536ebb96ab5a681f..2a4c36f8f7dada5503b0c0c55875144e3c55344c 100644 (file)
@@ -336,8 +336,10 @@ Slvs_hEntity SketchSolver_Constraint::changeEntity(AttributeRefAttrPtr theAttrib
 Slvs_hEntity SketchSolver_Constraint::changeEntity(AttributePtr theEntity, int& theType)
 {
   Slvs_hEntity aResult = SLVS_E_UNKNOWN;
-  if (!theEntity || !isInitialized(theEntity))
+  if (!theEntity || !isInitialized(theEntity)) {
+    myErrorMsg = SketchSolver_Error::NOT_INITIALIZED();
     return SLVS_E_UNKNOWN;
+  }
 
   // If the entity is already in the group, try to find it
   std::map<std::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::const_iterator anEntIter =