]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
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 37a7202f2054bdf8a4fed97f0b8501e0440bc46c..f8d5ff4655c01841423296f250f96fb3a21bb440 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;
          }
        }