nullpointer bug fix on consensus thread
[jalview.git] / src / jalview / gui / AlignViewport.java
index afdfd69..a2d5ec2 100755 (executable)
@@ -513,7 +513,7 @@ public class AlignViewport
 
         try
         {
-          int aWidth = alignment.getWidth();
+          int aWidth = (alignment!=null) ? alignment.getWidth() : 0; // null pointer possibility here.
           if(aWidth<0)
         {
             return;