From: gka Date: Mon, 21 May 2018 13:09:28 +0000 (+0300) Subject: 0029784: Crash at STEP file reading with enabled sub-shapes X-Git-Tag: V7_3_0~15 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=ea7ffc28023772caf719d8e32320b5fdd0fa1fb9;p=occt.git 0029784: Crash at STEP file reading with enabled sub-shapes In the method STEPCAFControl_Reader::ExpandShell protection for case when entity ""Connected_Face_Set" contains not only "FACE" entities ( for example "VERTEX_POINT" entities) was added. --- diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 75fd04b0df..e3b8c9997b 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -4580,6 +4580,8 @@ void STEPCAFControl_Reader::ExpandShell(const Handle(StepShape_ConnectedFaceSet) for ( Standard_Integer f = aFaces->Lower(); f <= aFaces->Upper(); ++f ) { const Handle(StepShape_Face)& aFace = aFaces->Value(f); + if (aFace.IsNull()) + continue; // Record CAF data SettleShapeData(aFace, RootLab, ShapeTool, TP);