From: azv Date: Tue, 30 Oct 2018 10:37:10 +0000 (+0300) Subject: Issue #2720: Fatal error when create arc X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=528218f35012ad71659e72ee6c8e2e644f458eba;p=modules%2Fshaper.git Issue #2720: Fatal error when create arc Avoid crash on creation of arc with equal center and start points. --- diff --git a/src/SketchPlugin/SketchPlugin_MacroArc.cpp b/src/SketchPlugin/SketchPlugin_MacroArc.cpp index b6a09bde6..8860e4f32 100644 --- a/src/SketchPlugin/SketchPlugin_MacroArc.cpp +++ b/src/SketchPlugin/SketchPlugin_MacroArc.cpp @@ -491,6 +491,9 @@ void SketchPlugin_MacroArc::fillByCenterAndTwoPassed() return; GeomAPI_Circ2d aCircleForArc(myCenter, myStart); + // avoid degerated arc, when the center and the start points are equal + if (!aCircleForArc.implPtr()) + return; bool aWasBlocked = data()->blockSendAttributeUpdated(true); // check the end point is referred to another feature