From 528218f35012ad71659e72ee6c8e2e644f458eba Mon Sep 17 00:00:00 2001 From: azv Date: Tue, 30 Oct 2018 13:37:10 +0300 Subject: [PATCH] Issue #2720: Fatal error when create arc Avoid crash on creation of arc with equal center and start points. --- src/SketchPlugin/SketchPlugin_MacroArc.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.39.2