Coverity fixes (24723,24336)
authorekryshen <evgeny.kryshen@cern.ch>
Mon, 12 Jan 2015 14:31:09 +0000 (15:31 +0100)
committerekryshen <evgeny.kryshen@cern.ch>
Mon, 12 Jan 2015 14:31:09 +0000 (15:31 +0100)
PWGCF/Correlations/Base/AliAnalysisTaskCFTree.cxx

index c7e06cb..08b5171 100644 (file)
@@ -245,7 +245,10 @@ void AliAnalysisTaskCFTree::UserExec(Option_t *){
     fMuons->Clear();
     for (Int_t iTrack = 0; iTrack < aod->GetNumberOfTracks(); iTrack++) {
       AliAODTrack* track = dynamic_cast<AliAODTrack*>(aod->GetTrack(iTrack));
-      if(!track) AliFatal("Not a standard AOD");
+      if(!track) {
+        AliWarning("Not a standard AOD");
+        continue;
+      }
       if (!track->IsMuonTrack()) continue;
       Float_t pt     = track->Pt();
       Float_t eta    = track->Eta();
@@ -279,6 +282,7 @@ void AliAnalysisTaskCFTree::UserExec(Option_t *){
       label = mcpart->GetMother();
       while (!isPrimary && label>=0) {
         mcpart = (AliVParticle*) fMCEvent->GetTrack(label);
+        if (!mcpart) continue;
         label = mcpart->GetMother();
         isPrimary = fMCEvent->IsPhysicalPrimary(label);
       }