0029784: Crash at STEP file reading with enabled sub-shapes
authorgka <gka@opencascade.com>
Mon, 21 May 2018 13:09:28 +0000 (16:09 +0300)
committerabv <abv@opencascade.com>
Thu, 24 May 2018 12:36:26 +0000 (15:36 +0300)
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.

src/STEPCAFControl/STEPCAFControl_Reader.cxx

index 75fd04b..e3b8c99 100644 (file)
@@ -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);