From 89682548b15252e424ffb9c1996cbeea1093b327 Mon Sep 17 00:00:00 2001 From: azv Date: Mon, 10 Apr 2017 16:49:40 +0300 Subject: [PATCH] Issue #2120: Crash when creating an arc passing through the arc connected to both ends --- src/GeomAlgoAPI/GeomAlgoAPI_Circ2dBuilder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Circ2dBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_Circ2dBuilder.cpp index 286b226d3..43e816d6e 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Circ2dBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Circ2dBuilder.cpp @@ -307,7 +307,7 @@ private: double aParSol, aPonTgCurve; gp_Pnt2d aTgPnt; - for (int i = 1; i <= aNbSol; ++i) { + for (int i = 1; i <= aNbSol && aNbSol > 1; ++i) { bool isApplicable = false; if (myTangentShapes.size() >= 1) { theBuilder->Tangency1(i, aParSol, aPonTgCurve, aTgPnt); @@ -379,7 +379,7 @@ private: double aParSol, aPonTgCurve; gp_Pnt2d aTgPnt; - for (int i = 1; i <= aNbSol; ++i) { + for (int i = 1; i <= aNbSol && aNbSol > 1; ++i) { bool isApplicable = false; if (myTangentShapes.size() >= 1) { theBuilder->Tangency1(i, aParSol, aPonTgCurve, aTgPnt); -- 2.39.2