]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Additional protection
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 Jul 2005 13:09:30 +0000 (13:09 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 Jul 2005 13:09:30 +0000 (13:09 +0000)
MUON/AliMUONHitMapA1.cxx

index 428bfc1458282775f6c02c8c73a6cd24f9c609c0..7684987617b413e6ce517fc6435d51cb83a6be4f 100644 (file)
@@ -147,7 +147,10 @@ FlagType AliMUONHitMapA1::TestHit(Int_t ix, Int_t iy)
 {
 // Check if hit cell is empty, used or unused
 //
-    Int_t inf=fHitMap[CheckedIndex(ix, iy)];
+    Int_t index = CheckedIndex(ix, iy);
+    if (index<0 || index >= fMaxIndex) return kEmpty;
+
+    Int_t inf=fHitMap[index];
     if (inf < 0) {
        return kUsed;
     } else if (inf == 0) {