From: jprocter Date: Mon, 13 Jun 2005 14:23:17 +0000 (+0000) Subject: null pointer fix. X-Git-Tag: Release_2_0~58 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=5ba8b4a50183f8a799069ba7a4dabd4cc2589a5b;p=jalview.git null pointer fix. --- diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index 789fb3f..c442465 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -219,8 +219,9 @@ public class SeqCanvas // Set this to false to force a full panel paint public void paintComponent(Graphics g) { - if (fastPaint || getWidth() != g.getClipBounds().width - || getHeight() != g.getClipBounds().height) + if (img!=null + && (fastPaint || getWidth() != g.getClipBounds().width + || getHeight() != g.getClipBounds().height)) { g.drawImage(img, 0, 0, this); fastPaint = false;