From 1f9990748644d3380bc045aad1f694c0252cc35f Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 27 Apr 2007 16:19:57 +0000 Subject: [PATCH] Prevent err when editing and overview drawing --- src/jalview/appletgui/AnnotationPanel.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index fbc98be..101bddf 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -1078,6 +1078,7 @@ public class AnnotationPanel public void drawGraph(Graphics g, AlignmentAnnotation aa, int width, int y, int sRes, int eRes) { + eRes = Math.min(eRes, aa.annotations.length); g.setColor(Color.white); g.fillRect(0, 0, width, y); g.setColor(new Color(0, 0, 180)); -- 1.7.10.2