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 48092341e532fd49a8da88798a5993348cbebef7..a957076844fce24f506ddceab98a783417fc828e 100644 (file)
@@ -56,7 +56,10 @@ AliJetKineReader::AliJetKineReader():
 AliJetKineReader::~AliJetKineReader()
 {
   // Destructor
-  delete fAliHeader;
+    if (fAliHeader) {
+       delete fAliHeader;
+       fAliHeader = 0;
+    }
 }
 
 //____________________________________________________________________________
index 0c90c95b307e792885484c25c4e9475f4a4af0ae..6cc730a06d73dccf4533b0c94c785430b535f845 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;
+  }
 }