Additional protection (valgrind)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 24 Oct 2006 13:03:37 +0000 (13:03 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 24 Oct 2006 13:03:37 +0000 (13:03 +0000)
PHOS/AliPHOSRecParticle.cxx

index 08d5553..aed0e84 100644 (file)
@@ -180,7 +180,8 @@ Int_t AliPHOSRecParticle::GetPrimaryIndex() const
       bestDigitIndex = iDigit;
     }
   }
-  digit = gime->Digit(digitList[bestDigitIndex]);
+  if (bestDigitIndex>-1)
+    digit = gime->Digit(digitList[bestDigitIndex]);
   if (digit==0) return -12345;