X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FJSONFile.java;h=653c071579c754563068095bb0a0a2bf3e985c82;hb=refs%2Fheads%2Freleases%2FRelease_2_10_0_Branch;hp=36980f8d7616facc6103e358bc8d308b98136966;hpb=f3392c352962c6827674ada5948500725e4eed1e;p=jalview.git diff --git a/src/jalview/io/JSONFile.java b/src/jalview/io/JSONFile.java index 36980f8..653c071 100644 --- a/src/jalview/io/JSONFile.java +++ b/src/jalview/io/JSONFile.java @@ -735,6 +735,10 @@ public class JSONFile extends AlignFile implements ComplexAlignFile @Override public void configureForView(AlignmentViewPanel avpanel) { + if (avpanel == null) + { + return; + } super.configureForView(avpanel); AlignViewportI viewport = avpanel.getAlignViewport(); AlignmentI alignment = viewport.getAlignment(); @@ -744,11 +748,14 @@ public class JSONFile extends AlignFile implements ComplexAlignFile fr = avpanel.cloneFeatureRenderer(); // Add non auto calculated annotation to AlignFile - for (AlignmentAnnotation annot : annots) + if (annots != null) { - if (annot != null && !annot.autoCalculated) + for (AlignmentAnnotation annot : annots) { - annotations.add(annot); + if (annot != null && !annot.autoCalculated) + { + annotations.add(annot); + } } } globalColourScheme = ColourSchemeProperty.getColourName(viewport