null pointer fix.
authorjprocter <Jim Procter>
Mon, 13 Jun 2005 14:23:17 +0000 (14:23 +0000)
committerjprocter <Jim Procter>
Mon, 13 Jun 2005 14:23:17 +0000 (14:23 +0000)
src/jalview/gui/SeqCanvas.java

index 789fb3f..c442465 100755 (executable)
@@ -219,8 +219,9 @@ public class SeqCanvas
   // Set this to false to force a full panel paint\r
   public void paintComponent(Graphics g)\r
   {\r
-    if (fastPaint  ||  getWidth() !=  g.getClipBounds().width\r
-                   ||  getHeight() != g.getClipBounds().height)\r
+    if (img!=null\r
+        && (fastPaint  ||  getWidth() !=  g.getClipBounds().width\r
+            ||  getHeight() != g.getClipBounds().height))\r
     {\r
       g.drawImage(img, 0, 0, this);\r
       fastPaint = false;\r