forgot a protection before delete
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 29 Apr 2008 13:07:31 +0000 (13:07 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 29 Apr 2008 13:07:31 +0000 (13:07 +0000)
STEER/AliQADataMakerRec.cxx
STEER/AliQADataMakerSim.cxx

index 1b74c93caa04c47bbedd2f88b89fd4d7d44fdf7e..49fd2c90b48caf44cf48ad9f16d3151005f25617 100644 (file)
@@ -66,12 +66,18 @@ AliQADataMakerRec::AliQADataMakerRec(const AliQADataMakerRec& qadm) :
 AliQADataMakerRec::~AliQADataMakerRec()
 {
        //dtor: delete the TObjArray and thei content
-       fESDsQAList->Delete() ;     
-       fRawsQAList->Delete() ;
-       fRecPointsQAList->Delete() ; 
-       delete fESDsQAList ;     
-       delete fRawsQAList ;
-       delete fRecPointsQAList ; 
+       if ( fESDsQAList ) {
+               fESDsQAList->Delete() ;     
+               delete fESDsQAList ;     
+       }
+       if ( fRawsQAList ) {
+               fRawsQAList->Delete() ;
+               delete fRawsQAList ;
+       }
+       if ( fRecPointsQAList ) {
+               fRecPointsQAList->Delete() ; 
+               delete fRecPointsQAList ; 
+       }
 }
 
 //__________________________________________________________________
index 148fc3734a464776c1257b4ffad9c8d7c5e48574..57522da8cc18c27d694bdb6666dd7c42ad670e8d 100644 (file)
@@ -62,12 +62,18 @@ AliQADataMakerSim::AliQADataMakerSim(const AliQADataMakerSim& qadm) :
 AliQADataMakerSim::~AliQADataMakerSim()
 {
        //dtor: delete the TObjArray and thei content
-       fDigitsQAList->Delete() ;     
-       fHitsQAList->Delete() ;
-       fSDigitsQAList->Delete() ; 
-       delete fDigitsQAList ;     
-       delete fHitsQAList ;
-       delete fSDigitsQAList ; 
+       if ( fDigitsQAList ) { 
+               fDigitsQAList->Delete() ;     
+               delete fDigitsQAList ;     
+       }
+       if ( fHitsQAList ) {
+               fHitsQAList->Delete() ;
+               delete fHitsQAList ;
+       }
+       if ( fSDigitsQAList ) { 
+               fSDigitsQAList->Delete() ; 
+               delete fSDigitsQAList ; 
+       }
 }
 
 //__________________________________________________________________