From 545ef510a7c1e46e04317d83a1c0a53a1e5b6d63 Mon Sep 17 00:00:00 2001 From: gka Date: Thu, 23 Jan 2014 11:44:07 +0400 Subject: [PATCH] 0024517: Crash at StepToTopoDS_TranslateEdge::Init() 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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx index 5f36c5911b..d2715aeef5 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx @@ -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;