]> OCCT Git - occt.git/commitdiff
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 4a726bba164166d84691a3b41359bd3efed9de6e..b992c80aa7def4d460db0c26c61f229a8c6c1e0c 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);