]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coverity fix
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 May 2013 14:59:05 +0000 (14:59 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 May 2013 14:59:05 +0000 (14:59 +0000)
STEER/STEERBase/AliMCEvent.cxx

index 363ea01c126ca10fa1a16c047f227d00696b427a..4ff92e832ba98ba0e37972bef0853a643dab2ab6 100644 (file)
@@ -620,7 +620,7 @@ AliGenEventHeader *AliMCEvent::FindHeader(Int_t ipart) {
     Int_t nproduced = 0;
     do { // Go trhough all headers and look for the correct one
       header = (AliGenEventHeader*) headIt();
-      nproduced += header->NProduced();
+      if (header) nproduced += header->NProduced();
     } while (header && ipart >= nproduced);
   }