From 22c937518085ae33a7e2bf7b166c4ad16ccef0e9 Mon Sep 17 00:00:00 2001 From: dbv Date: Tue, 30 Aug 2016 10:54:21 +0300 Subject: [PATCH] Fix for dimensions crash --- src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp b/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp index 962ddfbc8..35104dc38 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp @@ -122,7 +122,11 @@ void SketchPlugin_ConstraintDistance::move(double theDeltaX, double theDeltaY) std::shared_ptr aPoint = std::dynamic_pointer_cast( aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT())); myFlyoutUpdate = true; - aPoint->setValue(aPoint->x() + dX, aPoint->y() + dY); + if (aPoint->isInitialized()) { + aPoint->setValue(aPoint->x() + dX, aPoint->y() + dY); + } else { + aPoint->setValue(dX, dY); + } myFlyoutUpdate = false; } -- 2.39.2