ALIROOT-5575 Missing protection in AliAnalysisTaskFiltereTree
authorhristov <Peter.Hristov@cern.ch>
Thu, 14 Aug 2014 11:05:32 +0000 (13:05 +0200)
committerhristov <Peter.Hristov@cern.ch>
Thu, 14 Aug 2014 11:05:44 +0000 (13:05 +0200)
PWGPP/AliAnalysisTaskFilteredTree.cxx

index 338a027..716c41c 100644 (file)
@@ -368,7 +368,7 @@ void AliAnalysisTaskFilteredTree::ProcessCosmics(AliESDEvent *const event, AliES
   Int_t ntracks=event->GetNumberOfTracks(); 
   UInt_t specie = event->GetEventSpecie();  // skip laser events
   if (specie==AliRecoParam::kCalib) return;
-  Int_t ntracksFriend = esdFriend->GetNumberOfTracks();
+  Int_t ntracksFriend = esdFriend ? esdFriend->GetNumberOfTracks() : 0;
 
 
   for (Int_t itrack0=0;itrack0<ntracks;itrack0++) {