JAL-244 noticed NPE exception was possible when visibility was adjusted in wrapped...
[jalview.git] / src / jalview / gui / AnnotationLabels.java
index a3f7e00..a0d70b4 100755 (executable)
@@ -1554,7 +1554,7 @@ public class AnnotationLabels extends JPanel
       }
     }
 
-    if (!resizePanel && dragEvent != null && aa != null)
+    if (!resizePanel && dragEvent != null && aa != null && selectedRow>-1 && selectedRow<aa.length)
     {
       if (actuallyDraw && g != null)
       {