From 0712410094dece81fc8677d3a31fef6bac9d2b7d Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 5 Dec 2005 16:28:56 +0000 Subject: [PATCH] Catch null colour exception --- src/MCview/PDBCanvas.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/MCview/PDBCanvas.java b/src/MCview/PDBCanvas.java index 70f959f..17db1a0 100755 --- a/src/MCview/PDBCanvas.java +++ b/src/MCview/PDBCanvas.java @@ -492,6 +492,8 @@ public class PDBCanvas extends JPanel implements MouseListener, MouseMotionListe { tmp.startCol = seqcanvas.getSequenceRenderer(). getResidueBoxColour( sequence, index); + if(tmp.startCol==null) + tmp.startCol = Color.white; tmp.startCol = seqcanvas.getFeatureRenderer(). findFeatureColour(tmp.startCol, sequence, index); @@ -508,6 +510,8 @@ public class PDBCanvas extends JPanel implements MouseListener, MouseMotionListe { tmp.endCol = seqcanvas.getSequenceRenderer(). getResidueBoxColour( sequence, index); + if(tmp.endCol==null) + tmp.endCol = Color.white; tmp.endCol = seqcanvas.getFeatureRenderer(). findFeatureColour(tmp.endCol, sequence, index); } -- 1.7.10.2