forgot a protection before delete
[u/mrichter/AliRoot.git] / STEER / AliQADataMakerRec.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 ; 
+       }
 }
 
 //__________________________________________________________________