fix coverity bug
authormchojnac <Marek.Chojnacki@cern.ch>
Mon, 17 Feb 2014 09:41:02 +0000 (10:41 +0100)
committermchojnac <Marek.Chojnacki@cern.ch>
Mon, 17 Feb 2014 09:47:57 +0000 (10:47 +0100)
PWGLF/SPECTRA/PiKaPr/TestAOD/AliAnalysisTaskSpectraBoth.cxx

index 78a7879..1a87c75 100644 (file)
@@ -346,7 +346,7 @@ void AliAnalysisTaskSpectraBoth::UserExec(Option_t *)
                                                if(indexMoth>=0)
                                                {
                                                        AliAODMCParticle* moth = (AliAODMCParticle*) arrayMC->At(indexMoth);
-                                                       if(!moth)
+                                                       if(moth)
                                                                motherpdg=TMath::Abs(moth->GetPdgCode());
                                                }
                                        }