return from painting if size is 0
[jalview.git] / src / jalview / gui / SeqCanvas.java
index 38825c5..698489e 100755 (executable)
@@ -177,6 +177,8 @@ public void fastPaint(int horizontal, int vertical)
     // this draws the whole of the alignment\r
       imgWidth  = getWidth();\r
       imgHeight = getHeight();\r
+      if(imgWidth==0 || imgHeight==0)\r
+        return;\r
 \r
       imgWidth -= imgWidth%av.charWidth;\r
       imgHeight-= imgHeight%av.charHeight;\r