Fix avoiding SegViol
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 15 Dec 2011 16:53:16 +0000 (16:53 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 15 Dec 2011 16:53:16 +0000 (16:53 +0000)
Hans Beck

PWG1/TRD/AliTRDcheckPID.cxx

index 4151d4a..b41302f 100644 (file)
@@ -120,7 +120,8 @@ void AliTRDcheckPID::LocalInit()
 //________________________________________________________________________
 AliTRDcheckPID::~AliTRDcheckPID() 
 {
-  if (AliAnalysisManager::GetAnalysisManager()->IsProofMode()) return;
+  AliAnalysisManager* amg = AliAnalysisManager::GetAnalysisManager();
+  if (amg && amg->IsProofMode()) return;
   if(fPID){fPID->Delete(); delete fPID;}
   if(fGraph){fGraph->Delete(); delete fGraph;}
   if(fUtil) delete fUtil;