catch occasional -ve imgWidth exception
[jalview.git] / src / jalview / gui / AnnotationPanel.java
index 487b832..0fb84b0 100755 (executable)
@@ -548,7 +548,8 @@ public class AnnotationPanel
       }
     }
     imgWidth = (av.endRes - av.startRes + 1) * av.charWidth;
-
+    if (imgWidth<1)
+      return;
     if (image == null || imgWidth != image.getWidth()
         || image.getHeight(this) != getHeight())
     {