]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix crashes in Boolean operations
authorazv <azv@opencascade.com>
Thu, 14 Dec 2017 07:35:04 +0000 (10:35 +0300)
committerazv <azv@opencascade.com>
Thu, 14 Dec 2017 07:36:20 +0000 (10:36 +0300)
src/GeomAlgoAPI/GeomAlgoAPI_PaveFiller.cpp

index 9b61619a30c2624525a9fee8cf5489fd9e9379b2..95a3440720ba5d7060db63a7a2d57e83df7abb54 100644 (file)
@@ -40,7 +40,7 @@ GeomAlgoAPI_PaveFiller::GeomAlgoAPI_PaveFiller(const ListOfShape& theListOfShape
 void GeomAlgoAPI_PaveFiller::build(const ListOfShape& theListOfShape,
                                    const bool theIsMakeCompSolids)
 {
-  BOPAlgo_PaveFiller aPaveFiller;
+  BOPAlgo_PaveFiller* aPaveFiller = new BOPAlgo_PaveFiller;
   BOPCol_ListOfShape aListOfShape;
   for(ListOfShape::const_iterator
     anIt = theListOfShape.cbegin(); anIt != theListOfShape.cend(); anIt++) {
@@ -53,13 +53,13 @@ void GeomAlgoAPI_PaveFiller::build(const ListOfShape& theListOfShape,
       aListOfShape.Append(aShape);
     }
   }
-  aPaveFiller.SetArguments(aListOfShape);
-  aPaveFiller.Perform();
+  aPaveFiller->SetArguments(aListOfShape);
+  aPaveFiller->Perform();
 #ifdef USE_OCCT_720
-  if (aPaveFiller.HasErrors())
+  if (aPaveFiller->HasErrors())
     return;
 #else
-  Standard_Integer iErr = aPaveFiller.ErrorStatus();
+  Standard_Integer iErr = aPaveFiller->ErrorStatus();
   if(iErr) {
     return;
   }
@@ -69,7 +69,7 @@ void GeomAlgoAPI_PaveFiller::build(const ListOfShape& theListOfShape,
   this->setImpl(aBuilder);
   this->setBuilderType(OCCT_BOPAlgo_Builder);
   aBuilder->SetArguments(aListOfShape);
-  aBuilder->PerformWithFiller(aPaveFiller);
+  aBuilder->PerformWithFiller(*aPaveFiller);
 #ifdef USE_OCCT_720
   if (aBuilder->HasErrors())
     return;