From: gmungoc Date: Fri, 30 Nov 2018 10:15:11 +0000 (+0000) Subject: JAL-3166 catch NPE if all sequences are hidden X-Git-Tag: Release_2_11_0~17^2~94^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fbug%2FJAL-3166npeAllRowsHidden;p=jalview.git JAL-3166 catch NPE if all sequences are hidden --- diff --git a/src/jalview/gui/IdPanel.java b/src/jalview/gui/IdPanel.java index a183144..fb37445 100755 --- a/src/jalview/gui/IdPanel.java +++ b/src/jalview/gui/IdPanel.java @@ -330,8 +330,11 @@ public class IdPanel extends JPanel * build a new links menu based on the current links * and any non-positional features */ + List features = null; + if (sq != null) + { List nlinks = Preferences.sequenceUrlLinks.getLinksForMenu(); - List features = sq.getFeatures().getNonPositionalFeatures(); + features = sq.getFeatures().getNonPositionalFeatures(); for (SequenceFeature sf : features) { if (sf.links != null) @@ -342,6 +345,7 @@ public class IdPanel extends JPanel } } } + } PopupMenu pop = new PopupMenu(alignPanel, sq, features, Preferences.getGroupURLLinks());