]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Crash when selecting Fixed constraint
authorazv <azv@opencascade.com>
Tue, 30 Aug 2016 15:36:09 +0000 (18:36 +0300)
committerazv <azv@opencascade.com>
Tue, 30 Aug 2016 15:36:09 +0000 (18:36 +0300)
src/SketchSolver/SketchSolver_Manager.cpp

index 5867d6b94ed72ee786f611536ad14829f3363c8a..3a8f8ea86b9c0fafd2fb13b64f5c93c6bfae9677 100644 (file)
@@ -733,10 +733,11 @@ void SketchSolver_Manager::degreesOfFreedom()
           aPoints.insert(aRefAttr->attr());
         } else {
           FeaturePtr anAttr = ModelAPI_Feature::feature(aRefAttr->object());
-          if (anAttr)
+          if (anAttr) {
             aDoF -= aDoFDelta[anAttr->getKind()];
-          std::list<AttributePtr> aPtAttrs = anAttr->data()->attributes(GeomDataAPI_Point2D::typeId());
-          aPoints.insert(aPtAttrs.begin(), aPtAttrs.end());
+            std::list<AttributePtr> aPtAttrs = anAttr->data()->attributes(GeomDataAPI_Point2D::typeId());
+            aPoints.insert(aPtAttrs.begin(), aPtAttrs.end());
+          }
         }
 
         // Check whether feature's points are already coincident with fixed points.