Null sequence check
authoramwaterhouse <Andrew Waterhouse>
Mon, 30 Jan 2006 14:56:51 +0000 (14:56 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 30 Jan 2006 14:56:51 +0000 (14:56 +0000)
src/jalview/gui/OverviewPanel.java

index 3662ec2..a35966d 100755 (executable)
@@ -281,13 +281,13 @@ public class OverviewPanel extends JPanel implements Runnable
             lastrow = (int)(row*sampleRow);\r
             lastcol = (int)(col*sampleCol);\r
 \r
-            color = sr.getResidueBoxColour(\r
+            if(av.alignment.getSequenceAt(lastrow).getLength()>lastcol)\r
+            {\r
+             color = sr.getResidueBoxColour(\r
                 av.alignment.getSequenceAt(lastrow), lastcol);\r
 \r
-            if(av.showSequenceFeatures)\r
-            {\r
-              color = fr.findFeatureColour(color,\r
-                                                       av.alignment.getSequenceAt(lastrow),\r
+             if(av.showSequenceFeatures)\r
+                  color = fr.findFeatureColour(color,  av.alignment.getSequenceAt(lastrow),\r
                                                        lastcol);\r
             }\r
 \r