Skip to content

Commit

Permalink
fix #16629 - IndexOutOfBoundsException
Browse files Browse the repository at this point in the history
  • Loading branch information
don-vip committed Aug 19, 2018
1 parent fbe4356 commit b301937
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public void paint(Graphics2D g, MapView mv, Bounds bbox) {
int index = nodes.indexOf(candidateNode);

// Only draw line if node is not first and/or last
if (index != 0 && index != (nodes.size() - 1)) {
if (index > 0 && index < (nodes.size() - 1)) {
p1 = mv.getPoint(nodes.get(index - 1));
p2 = mv.getPoint(nodes.get(index + 1));
}
Expand Down

0 comments on commit b301937

Please sign in to comment.