]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2404: Fatal error when create arc in tangent mode
authorazv <azv@opencascade.com>
Wed, 17 Jan 2018 11:34:35 +0000 (14:34 +0300)
committerazv <azv@opencascade.com>
Wed, 17 Jan 2018 11:34:35 +0000 (14:34 +0300)
Fix crash while preparing presentation of the Tangent constraint

src/SketcherPrs/SketcherPrs_PositionMgr.cpp

index 85aa05217cbe08cfe9473e4fef71f228f08d6174..3238fb24818f55018ba0bf873e55a3509444c4fc 100644 (file)
@@ -332,7 +332,7 @@ std::list<ObjectPtr> getCurves(const GeomPointPtr& thePnt, const SketcherPrs_Sym
         double aEnd = aCurve->endParam();
         GeomCirclePtr  aCircle = GeomCirclePtr(new GeomAPI_Circ(aCurve));
         GeomPointPtr aProjPnt = aCircle->project(thePnt);
-        if (thePnt->distance(aProjPnt) <= Precision::Confusion())
+        if (aProjPnt && thePnt->distance(aProjPnt) <= Precision::Confusion())
           aList.push_back(aResObj);
       }
     }