Skip to content

Commit

Permalink
Array index check. See #1488
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobinso committed Feb 8, 2024
1 parent d8f1b13 commit 1597f36
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/org/broad/igv/sam/AlignmentRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,9 @@ private void drawAlignment(

// Check if block is in visible rectangle
if (blockPxEnd < 0) {
blockChromStart = blocks[blockIx + 1].getStart(); // start position for the next block
if(blockIx + 1 < blocks.length) {
blockChromStart = blocks[blockIx + 1].getStart(); // start position for the next block
}
continue;
} else if (blockPxStart > rowRect.x + rowRect.width) {
break;
Expand Down

0 comments on commit 1597f36

Please sign in to comment.