From: dbv Date: Tue, 30 Aug 2016 07:54:21 +0000 (+0300) Subject: Fix for dimensions crash X-Git-Tag: V_2.5.0~114 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=22c937518085ae33a7e2bf7b166c4ad16ccef0e9;p=modules%2Fshaper.git Fix for dimensions crash --- 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; }