X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAnnotationPanel.java;h=614498c4bc1d684962a6e414de9a6cf1e35e0816;hb=f69f430dcc4205b54192407a16f828469c42b659;hp=71f51eaa1c165af833eab70fa4428d47383b1bb2;hpb=9ae26a7c4ce0bbc58c5ed5ad4371164a5fa80a66;p=jalview.git diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index 71f51ea..614498c 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -467,6 +467,9 @@ public class AnnotationPanel column++; } + if(column>=row.annotations.length) + column = row.annotations.length-1; + x += av.charWidth; if (row.hasIcons) @@ -511,8 +514,8 @@ public class AnnotationPanel case 'E': g.setColor(SHEET_COLOUR); - if (row.annotations.length > endRes - && row.annotations[endRes].secondaryStructure != 'E') + if (row.annotations[endRes] ==null + || row.annotations[endRes].secondaryStructure != 'E') { g.fillRect(lastSSX, y + 4 + iconOffset, x - lastSSX - 4, 7);