From: bhippoly Date: Sat, 5 Mar 2011 20:55:18 +0000 (+0000) Subject: fix for Coverity 10651 (B.Hippolyte) X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=95618715ed6f4d84efb89cab482b5fdb615d8f75;p=u%2Fmrichter%2FAliRoot.git fix for Coverity 10651 (B.Hippolyte) --- diff --git a/PWG2/KINK/AliResonanceKink.cxx b/PWG2/KINK/AliResonanceKink.cxx index 37a7202f205..f8d5ff4655c 100644 --- a/PWG2/KINK/AliResonanceKink.cxx +++ b/PWG2/KINK/AliResonanceKink.cxx @@ -304,7 +304,7 @@ void AliResonanceKink::Analyse(AliESDEvent* esd, AliMCEvent* mcEvent) for(Int_t ic=nDecayKaonDaughter; ic<=daughterParticle1->GetLastDaughter(); ic++) { if ((ic>=0)&&(icGetNtrack())) mcDaughters1Daughter= dynamic_cast(mcEvent->GetTrack(ic)); else continue; - if(mcDaughters1Daughter->Charge()!=0) numberOfCharged=numberOfCharged+1; + if(mcDaughters1Daughter && mcDaughters1Daughter->Charge()!=0) numberOfCharged=numberOfCharged+1; } }