return if image is null
authoramwaterhouse <Andrew Waterhouse>
Thu, 2 Nov 2006 15:13:34 +0000 (15:13 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 2 Nov 2006 15:13:34 +0000 (15:13 +0000)
src/jalview/gui/AnnotationPanel.java

index 417eb8c..315b141 100755 (executable)
@@ -108,7 +108,6 @@ public class AnnotationPanel extends JPanel implements MouseListener,
     public int adjustPanelHeight()\r
     {\r
         // setHeight of panels\r
-        image = null;\r
         AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();\r
         int height = 0;\r
 \r
@@ -659,6 +658,10 @@ public class AnnotationPanel extends JPanel implements MouseListener,
     {\r
       if(av.updatingConsensus || av.updatingConservation)\r
       {\r
+        if(image==null)\r
+         {\r
+           return;\r
+         }\r
         //We'll keep a record of the old image,\r
         //and draw a faded image until the calculation\r
         //has completed\r