patch for occasional ArrayIndexOutOfBounds
[jalview.git] / src / jalview / appletgui / AnnotationLabels.java
index 27c579a..64f5d0b 100755 (executable)
@@ -336,7 +336,7 @@ public class AnnotationLabels extends Panel implements ActionListener,
 
       int end = getSelectedRow(evt.getY() + scrollOffset);
 
-      if (start != end)
+      if (start>-1 && start != end)
       {
         // Swap these annotations
         AlignmentAnnotation startAA = ap.av.alignment