فهرست منبع

Merge pull request #2218 from assimp/kimkulling-patch-2-1

Update Exporter.cpp
Kim Kulling 6 سال پیش
والد
کامیت
831cbcf699
2فایلهای تغییر یافته به همراه1 افزوده شده و 5 حذف شده
  1. 1 4
      code/Exporter.cpp
  2. 0 1
      test/unit/ImportExport/utExporter.cpp

+ 1 - 4
code/Exporter.cpp

@@ -212,6 +212,7 @@ public:
         for( unsigned int a = 0; a < mPostProcessingSteps.size(); a++) {
             delete mPostProcessingSteps[a];
         }
+        delete mProgressHandler;
     }
 
 public:
@@ -246,10 +247,6 @@ Exporter :: Exporter()
 // ------------------------------------------------------------------------------------------------
 Exporter::~Exporter() {
     FreeBlob();
-    if (pimpl->mIsDefaultProgressHandler) {
-        delete pimpl->mProgressHandler;
-        pimpl->mProgressHandler = nullptr;
-    }
     delete pimpl;
 }
 

+ 0 - 1
test/unit/ImportExport/utExporter.cpp

@@ -70,5 +70,4 @@ TEST_F(ExporterTest, ProgressHandlerTest) {
     Exporter exporter;
     TestProgressHandler *ph(new TestProgressHandler);
     exporter.SetProgressHandler(ph);
-    delete ph;
 }