]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Zero pointer check after cast (Coverity)
authormvl <mvl@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 16 Jul 2013 08:04:18 +0000 (08:04 +0000)
committermvl <mvl@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 16 Jul 2013 08:04:18 +0000 (08:04 +0000)
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskHJetEmbed.cxx

index 4eb18826eceafa67775823f2f84e044499b293c4..524bdfa3bebfb516374bacc1dfbd57c54f804e3a 100644 (file)
@@ -600,7 +600,7 @@ void  AliAnalysisTaskHJetEmbed::FillHJetCor(const TClonesArray *tracks, const In
   for(Int_t ij=0; ij<nJets; ij++)
     {
       AliEmcalJet* jet = dynamic_cast<AliEmcalJet*>(jetArray->At(ij));
-      if(!IsGoodJet(jet)) continue; // eta cut
+      if(jet==0 || !IsGoodJet(jet)) continue; // eta cut  // jet == 0 should not occur, but Coverity wants us to check...
       Double_t jetPhi = jet->Phi();
       Double_t jetPt  = jet->Pt();
       Double_t jetArea = jet->Area();