Salome HOME
Meet the coding style (line length <= 100)
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_MacroArc.cpp
index e963cfe14c33a4cc1a9b2503fda2fdc9e4f6e656..5bbb322358f90792c725358c6a973603614ec281 100644 (file)
@@ -113,7 +113,9 @@ static void intersectShapeAndCircle(const GeomShapePtr& theShape,
       }
     }
   }
-  theIntersection->setValue(anInterPnt);
+  if(anInterPnt.get()) {
+    theIntersection->setValue(anInterPnt);
+  }
 }
 
 
@@ -355,7 +357,7 @@ void SketchPlugin_MacroArc::execute()
   // message to init reentrant operation
   static Events_ID anId = SketchPlugin_MacroArcReentrantMessage::eventId();
   std::shared_ptr<SketchPlugin_MacroArcReentrantMessage> aMessage = std::shared_ptr
-    <SketchPlugin_MacroArcReentrantMessage>(new SketchPlugin_MacroArcReentrantMessage(anId, 0));
+    <SketchPlugin_MacroArcReentrantMessage>(new SketchPlugin_MacroArcReentrantMessage(anId, this));
 
   std::string anEditArcType = string(EDIT_ARC_TYPE_ID())->value();
   aMessage->setTypeOfCreation(!anEditArcType.empty() ? anEditArcType : anArcType);