Merge branch 'bug/JAL-3166npeAllRowsHidden' into develop
[jalview.git] / src / jalview / gui / IdPanel.java
index 34bda10..3888a74 100755 (executable)
@@ -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<SequenceFeature> features = null;
+    if (sq != null)
+    {
     List<String> nlinks = Preferences.sequenceUrlLinks.getLinksForMenu();
-    List<SequenceFeature> 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());