]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Avoid crash on Length constraint with value equal to 0
authorazv <azv@opencascade.com>
Tue, 23 Sep 2014 11:31:52 +0000 (15:31 +0400)
committerazv <azv@opencascade.com>
Tue, 23 Sep 2014 12:59:47 +0000 (16:59 +0400)
src/SketchSolver/SketchSolver_Constraint.cpp

index d5f1e6810f95dda81de2d48ff4b0a4ef31ec9c1a..19af99788872f7da8b4c0583d3a2845ca01fe208 100644 (file)
@@ -190,7 +190,7 @@ AttrType typeOfAttribute(boost::shared_ptr<ModelAPI_Attribute> theAttribute)
   if (anAttrRef->isObject()) {
     ResultConstructionPtr aRC = boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(
         anAttrRef->object());
-    if (!aRC)
+    if (!aRC || !aRC->shape())
       return UNKNOWN;
 
     if (aRC->shape()->isVertex())