fix for Coverity 10651 (B.Hippolyte)
authorbhippoly <bhippoly@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 5 Mar 2011 20:55:18 +0000 (20:55 +0000)
committerbhippoly <bhippoly@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 5 Mar 2011 20:55:18 +0000 (20:55 +0000)
PWG2/KINK/AliResonanceKink.cxx

index 37a7202..f8d5ff4 100644 (file)
@@ -304,7 +304,7 @@ void AliResonanceKink::Analyse(AliESDEvent* esd, AliMCEvent* mcEvent)
          for(Int_t ic=nDecayKaonDaughter; ic<=daughterParticle1->GetLastDaughter(); ic++) {
           if ((ic>=0)&&(ic<stack->GetNtrack())) mcDaughters1Daughter= dynamic_cast<AliMCParticle*>(mcEvent->GetTrack(ic));
            else continue;
-           if(mcDaughters1Daughter->Charge()!=0) numberOfCharged=numberOfCharged+1;
+           if(mcDaughters1Daughter && mcDaughters1Daughter->Charge()!=0) numberOfCharged=numberOfCharged+1;
          }
        }