From: azv Date: Mon, 10 Apr 2017 13:49:40 +0000 (+0300) Subject: Issue #2120: Crash when creating an arc passing through the arc connected to both... X-Git-Tag: V_2.7.0~23 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=89682548b15252e424ffb9c1996cbeea1093b327;p=modules%2Fshaper.git Issue #2120: Crash when creating an arc passing through the arc connected to both ends --- 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);