]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0023505: Sigsegv with fuse on cylinder and cone
authorjfa <jfa@opencascade.com>
Fri, 8 Dec 2017 08:34:36 +0000 (11:34 +0300)
committerjfa <jfa@opencascade.com>
Fri, 8 Dec 2017 08:34:36 +0000 (11:34 +0300)
src/BlockFix/BlockFix_UnionFaces.cxx

index feeadff8383498eee8e6613121c32ddef51398a1..99f770afb1dc343aa3ac9a2731988a005b0faa7e 100644 (file)
@@ -598,10 +598,13 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
       sfw->SetMaxTolerance(Max(1.,myTolerance*1000.));
       sfw->SetFace(aFace);
       for (TopoDS_Iterator iter (aFace,Standard_False); iter.More(); iter.Next()) {
-        TopoDS_Wire wire = TopoDS::Wire(iter.Value());
-        sfw->Load(wire);
-        sfw->FixReorder();
-        sfw->FixShifted();
+        TopoDS_Shape aFaceCont = iter.Value();
+        if (!aFaceCont.IsNull() && aFaceCont.ShapeType() == TopAbs_WIRE) {
+          TopoDS_Wire wire = TopoDS::Wire(iter.Value());
+          sfw->Load(wire);
+          sfw->FixReorder();
+          sfw->FixShifted();
+        }
       }
     }
   } // end processing each solid