Check if colos are null
[jalview.git] / src / jalview / gui / SeqCanvas.java
index 12659a8..b2e9d3e 100755 (executable)
@@ -188,12 +188,13 @@ public void fastPaint(int horizontal, int vertical)
     // this draws the whole of the alignment\r
       imgWidth  = getWidth();\r
       imgHeight = getHeight();\r
-      if(imgWidth<1 || imgHeight<1)\r
-        return;\r
 \r
       imgWidth -= imgWidth%av.charWidth;\r
       imgHeight-= imgHeight%av.charHeight;\r
 \r
+      if(imgWidth<1 || imgHeight<1)\r
+        return;\r
+\r
       img = new BufferedImage(imgWidth,imgHeight,BufferedImage.TYPE_INT_RGB);\r
       gg  = (Graphics2D)img.getGraphics();\r
       gg.setFont(av.getFont());\r