From 21930635bd32076820fe0f474bd8f8f89b84dff2 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 12 Sep 2005 16:59:42 +0000 Subject: [PATCH] null pointers removed --- src/jalview/appletgui/AnnotationPanel.java | 3 +++ src/jalview/gui/AnnotationPanel.java | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index ec5fbc6..f7ba2fe 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -130,6 +130,9 @@ public class AnnotationPanel if (activeRow == -1) { AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation(); + if(aa ==null) + return; + for (int j = 0; j < aa.length; j++) { if (aa[j].editable) diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index f13bc91..5f0d3c8 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -148,7 +148,9 @@ public class AnnotationPanel extends JPanel implements MouseListener, if (activeRow == -1) { AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation(); - if(aa!=null) + if(aa==null) + return; + for (int j = 0; j < aa.length; j++) { if (aa[j].editable) -- 1.7.10.2