NPE exception if annotation manually edited
authorjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 28 Oct 2011 14:01:04 +0000 (15:01 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 28 Oct 2011 14:01:04 +0000 (15:01 +0100)
src/jalview/renderer/AnnotationRenderer.java

index c3d4ef5..5c03881 100644 (file)
@@ -37,7 +37,7 @@ public class AnnotationRenderer
     int x2 = (x * charWidth);
     Regex closeparen = new Regex("(\\))");
   
-    String dc = column == 0 ? ""
+    String dc = (column == 0 || row.annotations[column-1]==null) ? ""
             : row.annotations[column - 1].displayCharacter;
   
     boolean diffupstream = sCol == 0 || row.annotations[sCol - 1] == null