From f92b601879c3cb6f3f8cf475786dbca82ff8ab23 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 9 Dec 2015 16:03:51 +0000 Subject: [PATCH] JAL-1982 hotfix to prevent NPE with applet launch on Jpred4 site --- src/jalview/appletgui/AlignFrame.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 50fe3a7..d4127ab 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(); @@ -2609,6 +2612,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, } + @Override public void changeColour(ColourSchemeI cs) { @@ -3759,6 +3763,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, this.add(statusBar, BorderLayout.SOUTH); } + @Override public void setStatus(String string) { statusBar.setText(string); -- 1.7.10.2