0026786: Segmentation violation exception raised if a shape to be fixed is null
authorika <ika@opencascade.com>
Thu, 16 Jun 2016 13:06:53 +0000 (16:06 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 23 Jun 2016 15:14:36 +0000 (18:14 +0300)
Add check for null shape.

src/ShapeProcessAPI/ShapeProcessAPI_ApplySequence.cxx

index 4a726bb..b992c80 100644 (file)
@@ -64,6 +64,8 @@ TopoDS_Shape ShapeProcessAPI_ApplySequence::PrepareShape(const TopoDS_Shape& sha
                                                          const Standard_Boolean /*fillmap*/,
                                                          const TopAbs_ShapeEnum /*until*/)
 {
+  if (shape.IsNull())
+    return shape;
   Handle(Resource_Manager) rsc = myContext->ResourceManager();
   myContext->Init(shape);