update to stay in sync with modifications by Ruben (Ionut)
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Nov 2011 11:27:29 +0000 (11:27 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Nov 2011 11:27:29 +0000 (11:27 +0000)
PWG1/TRD/AliTRDcheckESD.cxx

index 29727377195cef73e014736812ec4494d59e9238..35fdd9001c28a086cded824056a5ab1235cce3fa 100644 (file)
@@ -138,9 +138,10 @@ AliTRDcheckESD::AliTRDcheckESD(char* name):
 AliTRDcheckESD::~AliTRDcheckESD()
 {
 // Destructor
 AliTRDcheckESD::~AliTRDcheckESD()
 {
 // Destructor
-  if(fHistos && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()){
-    //fHistos->Delete();
+  if(fHistos && !(AliAnalysisManager::GetAnalysisManager() && AliAnalysisManager::GetAnalysisManager()->IsProofMode())){
+    if(fHistos->IsOwner()) fHistos->Delete();
     delete fHistos;
     delete fHistos;
+    fHistos = NULL;
   }
   if(fResults){
     fResults->Delete();
   }
   if(fResults){
     fResults->Delete();