JAL-915 - ensured that exceptions are not raised in applet or application, and that...
[jalview.git] / src / jalview / gui / IdPanel.java
index 5b689bf..ea8b711 100755 (executable)
@@ -314,7 +314,7 @@ public class IdPanel extends JPanel implements MouseListener,
       // build a new links menu based on the current links + any non-positional
       // features
       Vector nlinks = new Vector(Preferences.sequenceURLLinks);
-      SequenceFeature sf[] = sq.getDatasetSequence().getSequenceFeatures();
+      SequenceFeature sf[] = sq==null ? null : sq.getDatasetSequence().getSequenceFeatures();
       for (int sl = 0; sf != null && sl < sf.length; sl++)
       {
         if (sf[sl].begin == sf[sl].end && sf[sl].begin == 0)