Corrections in the destructors (J. Thaeder)
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 16 Mar 2009 12:58:17 +0000 (12:58 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 16 Mar 2009 12:58:17 +0000 (12:58 +0000)
JETAN/AliJetKineReader.cxx
JETAN/AliJetReader.cxx

index 4809234..a957076 100644 (file)
@@ -56,7 +56,10 @@ AliJetKineReader::AliJetKineReader():
 AliJetKineReader::~AliJetKineReader()
 {
   // Destructor
-  delete fAliHeader;
+    if (fAliHeader) {
+       delete fAliHeader;
+       fAliHeader = 0;
+    }
 }
 
 //____________________________________________________________________________
index 0c90c95..6cc730a 100755 (executable)
@@ -72,7 +72,6 @@ AliJetReader::~AliJetReader()
   }
   
   if (fUnitArray) {
-      fUnitArray->Delete();
       delete fUnitArray;
   }
   
@@ -85,8 +84,11 @@ AliJetReader::~AliJetReader()
     fFillUnitArray->Delete();
     delete fFillUnitArray;
   }
-  delete fArrayMC;
-  
+
+  if (fArrayMC) {
+    fArrayMC->Delete();
+    delete fArrayMC;
+  }
 }