null pointers removed
authoramwaterhouse <Andrew Waterhouse>
Mon, 12 Sep 2005 16:59:42 +0000 (16:59 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 12 Sep 2005 16:59:42 +0000 (16:59 +0000)
src/jalview/appletgui/AnnotationPanel.java
src/jalview/gui/AnnotationPanel.java

index ec5fbc6..f7ba2fe 100755 (executable)
@@ -130,6 +130,9 @@ public class AnnotationPanel
     if (activeRow == -1)\r
     {\r
       AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();\r
+      if(aa ==null)\r
+        return;\r
+\r
       for (int j = 0; j < aa.length; j++)\r
       {\r
         if (aa[j].editable)\r
index f13bc91..5f0d3c8 100755 (executable)
@@ -148,7 +148,9 @@ public class AnnotationPanel extends JPanel implements MouseListener,
         if (activeRow == -1)\r
         {\r
             AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();\r
-            if(aa!=null)\r
+            if(aa==null)\r
+              return;\r
+\r
             for (int j = 0; j < aa.length; j++)\r
             {\r
                 if (aa[j].editable)\r