patch re JAL-554
[jalview.git] / src / jalview / appletgui / AnnotationLabels.java
index 54b8a84..62ed93c 100755 (executable)
@@ -248,6 +248,13 @@ public class AnnotationLabels extends Panel implements ActionListener,
     MenuItem item = new MenuItem(ADDNEW);
     item.addActionListener(this);
     popup.add(item);
+    if (aa == null)
+    {
+
+      popup.show(this, evt.getX(), evt.getY());
+      return;
+    }
+    // add the rest if there are actually rows to show
     item = new MenuItem(EDITNAME);
     item.addActionListener(this);
     popup.add(item);