From: vsv Date: Wed, 18 Jan 2017 14:03:38 +0000 (+0300) Subject: Issue #2011: Crash on using of degenerative edge X-Git-Tag: V_2.7.0~322 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6222decf41031864ed977e8ee2245eaa236350bb;p=modules%2Fshaper.git Issue #2011: Crash on using of degenerative edge --- 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);