]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2066: crash when create Circle with Origin of coordinate sustem selected as...
authordbv <dbv@opencascade.com>
Wed, 29 Mar 2017 09:50:18 +0000 (12:50 +0300)
committerdbv <dbv@opencascade.com>
Wed, 29 Mar 2017 09:51:04 +0000 (12:51 +0300)
Fixed crash

src/SketchPlugin/SketchPlugin_MacroCircle.cpp

index 7232a6c37fac9462dbdc21e355d865beabbc1c0b..2af73d693548bc28112927fe3e95b65152691a03 100644 (file)
@@ -270,6 +270,8 @@ AISObjectPtr SketchPlugin_MacroCircle::getAISObject(AISObjectPtr thePrevious)
     return AISObjectPtr();
 
   std::shared_ptr<GeomAPI_Pnt2d> aCenter2D = aCircleOnSketch->center();
+  if(!aCenter2D.get())
+    return AISObjectPtr();
   double aRadius = aCircleOnSketch->radius();
 
   // Compute a circle in 3D view.