]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
coverity fix
authormcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 8 Oct 2012 19:39:28 +0000 (19:39 +0000)
committermcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 8 Oct 2012 19:39:28 +0000 (19:39 +0000)
PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.cxx

index bcc1f3832ee3381fc9c11910b3e319ef4f8db1a0..39305af36d048b28c8e0f63364723dd519f55b3d 100644 (file)
@@ -217,8 +217,11 @@ void AliAnalysisTaskEMCALIsoPhoton::UserExec(Option_t *)
 
   fEvtSel->Fill(1);
 
-  if (!fTracks)  
-    fTracks = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject("Tracks"));
+  fTracks = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject("Tracks"));
+  if(!fTracks){
+    AliError("Track array in event is NULL!");
+    return;
+  }
   // Track loop to fill a pT spectrum
   const Int_t Ntracks = fTracks->GetEntriesFast();
   for (Int_t iTracks = 0;  iTracks < Ntracks; ++iTracks) {