From 6222decf41031864ed977e8ee2245eaa236350bb Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 18 Jan 2017 17:03:38 +0300 Subject: [PATCH] Issue #2011: Crash on using of degenerative edge --- src/GeomAPI/GeomAPI_Edge.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/GeomAPI/GeomAPI_Edge.cpp b/src/GeomAPI/GeomAPI_Edge.cpp index 21aa2c5ed..0ce634005 100644 --- a/src/GeomAPI/GeomAPI_Edge.cpp +++ b/src/GeomAPI/GeomAPI_Edge.cpp @@ -193,6 +193,8 @@ bool GeomAPI_Edge::isInPlane(std::shared_ptr thePlane) const double aFirst, aLast; const TopoDS_Shape& aShape = const_cast(this)->impl(); Handle(Geom_Curve) aCurve = BRep_Tool::Curve((const TopoDS_Edge&)aShape, aFirst, aLast); + if (aCurve.IsNull()) + return false; double A, B, C, D; thePlane->coefficients(A, B, C, D); -- 2.39.2