]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2468 : Crash when sketching circles successively on a repetition.
authormpv <mikhail.ponikarov@opencascade.com>
Fri, 4 May 2018 11:45:23 +0000 (14:45 +0300)
committermpv <mikhail.ponikarov@opencascade.com>
Fri, 4 May 2018 11:45:45 +0000 (14:45 +0300)
Fix for the initial crash.

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()));