From: Jim Procter Date: Wed, 9 Dec 2015 16:03:51 +0000 (+0000) Subject: JAL-1982 hotfix to prevent NPE with applet launch on Jpred4 site X-Git-Tag: Release_2_10_0~331^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=db9d07a313118d821c2d1f2226d8a34c41e41947;p=jalview.git JAL-1982 hotfix to prevent NPE with applet launch on Jpred4 site --- diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 50ec7e0..28442a9 100644 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -930,12 +930,15 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, { boolean showForAlignment = showAlignmentAnnotations.getState(); boolean showForSequences = showSequenceAnnotations.getState(); - for (AlignmentAnnotation aa : alignPanel.getAlignment() + if (alignPanel.getAlignment().getAlignmentAnnotation() != null) + { + for (AlignmentAnnotation aa : alignPanel.getAlignment() .getAlignmentAnnotation()) { boolean visible = (aa.sequenceRef == null ? showForAlignment : showForSequences); aa.visible = visible; + } } alignPanel.validateAnnotationDimensions(true); validate();