0023882: Memory leak is reported on BOP in test bugs fclasses bug7287_5.
[occt.git] / src / BOPTest / BOPTest_BOPCommands.cxx
index 8331f75..b156207 100755 (executable)
@@ -139,11 +139,12 @@ Standard_Integer bop (Draw_Interpretor& di, Standard_Integer n, const char** a)
   aLC.Append(aS1);
   aLC.Append(aS2);
   //
-  if (!pPF) {
+  if (pPF!=NULL) {
     delete pPF;
-    Handle(NCollection_BaseAllocator)aAL=new NCollection_IncAllocator;
-    pPF=new BOPAlgo_PaveFiller(aAL);
+    pPF=NULL;
   }
+  Handle(NCollection_BaseAllocator)aAL=new NCollection_IncAllocator;
+  pPF=new BOPAlgo_PaveFiller(aAL);
   //
   pPF->SetArguments(aLC);
   //