]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchPlugin/SketchPlugin_ConstraintParallel.cpp
Salome HOME
Issue #144 Display flyout point for parellel constraint at point calculated by cascad...
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintParallel.cpp
index 3503ff45d5e076f440990e409015182f7a88a1bf..056eda9396ea1ef111796055c762de7e6a46a3a0 100644 (file)
@@ -73,7 +73,10 @@ AISObjectPtr SketchPlugin_ConstraintParallel::getAISObject(AISObjectPtr thePrevi
 
   boost::shared_ptr<GeomDataAPI_Point2D> aFlyoutAttr = boost::dynamic_pointer_cast<
       GeomDataAPI_Point2D>(aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT()));
-  boost::shared_ptr<GeomAPI_Pnt> aFlyoutPnt = sketch()->to3D(aFlyoutAttr->x(), aFlyoutAttr->y());
+  boost::shared_ptr<GeomAPI_Pnt> aFlyoutPnt = boost::shared_ptr<GeomAPI_Pnt>();;
+  if(aFlyoutAttr->isInitialized()) {
+    aFlyoutPnt = sketch()->to3D(aFlyoutAttr->x(), aFlyoutAttr->y());
+  }
 
   AISObjectPtr anAIS = thePrevious;
   if (!anAIS)