From: azv Date: Tue, 30 Oct 2018 10:37:10 +0000 (+0300) Subject: Issue #2720: Fatal error when create arc X-Git-Tag: End2018~231 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=578a48b785466b2f4544fbc346a97b3984ed5f5a;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