From d8fc358afe4950ac5ce2aa219bf18d29e97d5f2c Mon Sep 17 00:00:00 2001 From: mpv Date: Fri, 4 May 2018 14:45:23 +0300 Subject: [PATCH] Issue #2468 : Crash when sketching circles successively on a repetition. Fix for the initial crash. --- src/PartSet/PartSet_WidgetPoint2d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PartSet/PartSet_WidgetPoint2d.cpp b/src/PartSet/PartSet_WidgetPoint2d.cpp index 8782a90ac..9af640db2 100644 --- a/src/PartSet/PartSet_WidgetPoint2d.cpp +++ b/src/PartSet/PartSet_WidgetPoint2d.cpp @@ -343,7 +343,7 @@ bool PartSet_WidgetPoint2D::setPoint(double theX, double theY) bool PartSet_WidgetPoint2D::storeValueCustom() { std::shared_ptr 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( aData->attribute(attributeID())); -- 2.39.2