From 54b2e4d7f27026371dff2ad9d144e5574ff81e1a Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 11 Aug 2011 09:13:33 +0100 Subject: [PATCH] avoid NPE for null annotation element columns JAL-896 --- src/jalview/gui/AnnotationPanel.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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; -- 1.7.10.2