NPE exception if annotation manually edited
[jalview.git] / 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