]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2011: Crash on using of degenerative edge
authorvsv <vitaly.smetannikov@opencascade.com>
Wed, 18 Jan 2017 14:03:38 +0000 (17:03 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Wed, 18 Jan 2017 14:03:52 +0000 (17:03 +0300)
src/GeomAPI/GeomAPI_Edge.cpp

index 21aa2c5eda234030ebe7eebed5edc733133ef618..0ce6340051477195687fb07664200515d6c41ea5 100644 (file)
@@ -193,6 +193,8 @@ bool GeomAPI_Edge::isInPlane(std::shared_ptr<GeomAPI_Pln> thePlane) const
   double aFirst, aLast;
   const TopoDS_Shape& aShape = const_cast<GeomAPI_Edge*>(this)->impl<TopoDS_Shape>();
   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);