patch for JAL-699 so conservation/consensus threads restart correctly
[jalview.git] / src / jalview / appletgui / AlignViewport.java
index 804b590..6d6a3e6 100755 (executable)
@@ -371,9 +371,11 @@ public class AlignViewport
 
         UPDATING_CONSERVATION = true;
 
-        int alWidth = alignment.getWidth();
+        int alWidth = (alignment==null) ? -1 : alignment.getWidth();
         if (alWidth < 0)
         {
+          updatingConservation = false;
+          UPDATING_CONSERVATION = false;
           return;
         }
 
@@ -548,9 +550,11 @@ public class AlignViewport
 
       try
       {
-        int aWidth = alignment.getWidth();
+        int aWidth = alignment==null ? -1 : alignment.getWidth();
         if (aWidth < 0)
         {
+          UPDATING_CONSENSUS = false;
+          updatingConsensus = false;
           return;
         }