Return if negative width, ie alignment deleted
[jalview.git] / 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];