Catch null colour exception
authoramwaterhouse <Andrew Waterhouse>
Mon, 5 Dec 2005 16:28:56 +0000 (16:28 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 5 Dec 2005 16:28:56 +0000 (16:28 +0000)
src/MCview/PDBCanvas.java

index 70f959f..17db1a0 100755 (executable)
@@ -492,6 +492,8 @@ public class PDBCanvas extends JPanel implements MouseListener, MouseMotionListe
             {\r
               tmp.startCol = seqcanvas.getSequenceRenderer().\r
                   getResidueBoxColour( sequence, index);\r
+              if(tmp.startCol==null)\r
+                tmp.startCol = Color.white;\r
 \r
               tmp.startCol = seqcanvas.getFeatureRenderer().\r
                   findFeatureColour(tmp.startCol, sequence, index);\r
@@ -508,6 +510,8 @@ public class PDBCanvas extends JPanel implements MouseListener, MouseMotionListe
             {\r
               tmp.endCol = seqcanvas.getSequenceRenderer().\r
                   getResidueBoxColour( sequence, index);\r
+              if(tmp.endCol==null)\r
+                tmp.endCol = Color.white;\r
               tmp.endCol = seqcanvas.getFeatureRenderer().\r
                   findFeatureColour(tmp.endCol, sequence, index);\r
             }\r