Jalview 2.6 source licence
[jalview.git] / src / jalview / gui / AnnotationPanel.java
index 755b85a..638a1c9 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
  * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
  * 
  * This file is part of Jalview.
@@ -175,8 +175,9 @@ public class AnnotationPanel extends JPanel implements MouseListener,
         height += aa[i].height;
       }
     }
-    else
+    if (height==0)
     {
+      // set minimum
       height = 20;
     }
 
@@ -199,6 +200,10 @@ public class AnnotationPanel extends JPanel implements MouseListener,
   public void actionPerformed(ActionEvent evt)
   {
     AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();
+    if (aa==null)
+    {
+      return;
+    }
     Annotation[] anot = aa[activeRow].annotations;
 
     if (anot.length < av.getColumnSelection().getMax())