Salome HOME
Constriction type for all sketch entities
[modules/shaper.git] / src / SketchSolver / SketchSolver_Constraint.cpp
index 88f4572a17c05d7e8b20e352b0524cf32045a075..61a42b64cf43195b46d9b6bb549cffc78040aa83 100644 (file)
@@ -229,11 +229,13 @@ AttrType typeOfAttribute(std::shared_ptr<ModelAPI_Attribute> theAttribute)
         return ARC;
     }
   } else {
-    const std::string aType = anAttrRef->attr()->attributeType();
-    if (aType == GeomDataAPI_Point2D::type())
-      return POINT2D;
-    if (aType == GeomDataAPI_Point2D::type())
-      return POINT2D;
+    if (anAttrRef->attr().get() != NULL) {
+      const std::string aType = anAttrRef->attr()->attributeType();
+      if (aType == GeomDataAPI_Point2D::type())
+        return POINT2D;
+      if (aType == GeomDataAPI_Point2D::type())
+        return POINT2D;
+    }
   }
 
   return UNKNOWN;