patch to prevent NPE - which occurs if no features are available (see JAL-650)
authorjprocter <Jim Procter>
Thu, 16 Sep 2010 11:53:45 +0000 (11:53 +0000)
committerjprocter <Jim Procter>
Thu, 16 Sep 2010 11:53:45 +0000 (11:53 +0000)
src/jalview/gui/AnnotationExporter.java

index 857eabc..ceccd97 100755 (executable)
@@ -196,6 +196,10 @@ public class AnnotationExporter extends JPanel
   private Hashtable getDisplayedFeatureCols()\r
   {\r
     Hashtable fcols = new Hashtable();\r
+    if (ap.av.featuresDisplayed==null)\r
+    {\r
+      return fcols;\r
+    }\r
     Enumeration en = ap.av.featuresDisplayed.keys();\r
     FeatureRenderer fr = ap.seqPanel.seqCanvas.getFeatureRenderer(); // consider\r
                                                                      // higher\r