Return if negative width, ie alignment deleted
authoramwaterhouse <Andrew Waterhouse>
Wed, 25 Oct 2006 14:57:37 +0000 (14:57 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 25 Oct 2006 14:57:37 +0000 (14:57 +0000)
src/jalview/gui/AlignViewport.java

index fb3d4df..f9f32e4 100755 (executable)
@@ -280,6 +280,8 @@ public class AlignViewport
         try
         {
           int alWidth = alignment.getWidth();
+          if(alWidth<0)
+            return;
 
           Conservation cons = new jalview.analysis.Conservation("All",
               jalview.schemes.ResidueProperties.propHash, 3,
@@ -459,6 +461,8 @@ public class AlignViewport
         try
         {
           int aWidth = alignment.getWidth();
+          if(aWidth<0)
+            return;
 
           consensus.annotations = null;
           consensus.annotations = new Annotation[aWidth];