From: jprocter Date: Thu, 11 Aug 2011 08:13:33 +0000 (+0100) Subject: avoid NPE for null annotation element columns JAL-896 X-Git-Tag: Jalview_2_9~576^2~9 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=54b2e4d7f27026371dff2ad9d144e5574ff81e1a;p=jalview.git avoid NPE for null annotation element columns JAL-896 --- diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index ca9b95f..0e90a5e 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -1067,7 +1067,8 @@ public class AnnotationPanel extends JPanel implements MouseListener, } if (row.hasIcons) { - char ss = row.annotations[column].secondaryStructure; + char ss = validRes ? row.annotations[column].secondaryStructure + : ' '; if (ss == 'S') { // distinguish between forward/backward base-pairing @@ -1120,11 +1121,9 @@ public class AnnotationPanel extends JPanel implements MouseListener, } } } - column++; x++; } - if (column >= row.annotations.length) { column = row.annotations.length - 1;