Salome HOME
Issue #2468 : Crash when sketching circles successively on a repetition.
[modules/shaper.git] / src / PartSet / PartSet_WidgetPoint2d.cpp
index 8782a90acd49dfcecd4be4b191d7e037bf019a00..9af640db2587e46b0a5c021e4e1fb6771aea32e0 100644 (file)
@@ -343,7 +343,7 @@ bool PartSet_WidgetPoint2D::setPoint(double theX, double theY)
 bool PartSet_WidgetPoint2D::storeValueCustom()
 {
   std::shared_ptr<ModelAPI_Data> aData = myFeature->data();
-  if (!aData) // can be on abort of sketcher element
+  if (!aData || !aData->isValid()) // can be on abort of sketcher element
     return false;
   AttributePoint2DPtr aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aData->attribute(attributeID()));