From 5ba8b4a50183f8a799069ba7a4dabd4cc2589a5b Mon Sep 17 00:00:00 2001 From: jprocter Date: Mon, 13 Jun 2005 14:23:17 +0000 Subject: [PATCH] null pointer fix. --- src/jalview/gui/SeqCanvas.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 1.7.10.2