0024517: Crash at StepToTopoDS_TranslateEdge::Init()
authorgka <gka@opencascade.com>
Thu, 23 Jan 2014 07:44:07 +0000 (11:44 +0400)
committerbugmaster <bugmaster@opencascade.com>
Thu, 23 Jan 2014 09:36:55 +0000 (13:36 +0400)
Fixed crash at StepToTopoDS_TranslateEdge::Init() for case when curve is absent)

Corrected error message for case of absence geom curve in edge curve

src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx

index 5f36c59..d2715ae 100644 (file)
@@ -258,6 +258,13 @@ void StepToTopoDS_TranslateEdge::Init(const Handle(StepShape_Edge)& aEdge,
 //  Standard_Real precision = BRepAPI::Precision();
 
   Handle(StepGeom_Curve) C = EC->EdgeGeometry();
+  if( C.IsNull())
+  {
+    TP->AddFail(EC," Geom Curve in EdgeCurve is equal to 0");
+    myError = StepToTopoDS_TranslateEdgeOther;
+    done = Standard_False;
+    return;
+  }
   TopoDS_Edge E;
   Handle(StepShape_Vertex) Vstart, Vend;