Bug fix: crash when QA plots were not requested
authorsaiola <salvatore.aiola@cern.ch>
Tue, 9 Sep 2014 18:02:26 +0000 (14:02 -0400)
committersaiola <salvatore.aiola@cern.ch>
Tue, 9 Sep 2014 18:03:09 +0000 (14:03 -0400)
PWGJE/EMCALJetTasks/AliJetEmbeddingFromPYTHIATask.cxx

index 00e5fc5..5a54ff3 100644 (file)
@@ -148,7 +148,7 @@ Bool_t AliJetEmbeddingFromPYTHIATask::GetNextEntry()
   }
 
   fPtHardBinCount++;
-  fHistPtHardBins->SetBinContent(fCurrentPtHardBin+1, fHistPtHardBins->GetBinContent(fCurrentPtHardBin+1)+1);
+  if (fHistPtHardBins) fHistPtHardBins->SetBinContent(fCurrentPtHardBin+1, fHistPtHardBins->GetBinContent(fCurrentPtHardBin+1)+1);
 
   return AliJetEmbeddingFromAODTask::GetNextEntry();
 }