From 2cc0c155f1e785ce3d53529bb4375d4ddf1e8cc9 Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 16 Sep 2010 11:53:45 +0000 Subject: [PATCH] patch to prevent NPE - which occurs if no features are available (see JAL-650) --- src/jalview/gui/AnnotationExporter.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/jalview/gui/AnnotationExporter.java b/src/jalview/gui/AnnotationExporter.java index 857eabc..ceccd97 100755 --- a/src/jalview/gui/AnnotationExporter.java +++ b/src/jalview/gui/AnnotationExporter.java @@ -196,6 +196,10 @@ public class AnnotationExporter extends JPanel private Hashtable getDisplayedFeatureCols() { Hashtable fcols = new Hashtable(); + if (ap.av.featuresDisplayed==null) + { + return fcols; + } Enumeration en = ap.av.featuresDisplayed.keys(); FeatureRenderer fr = ap.seqPanel.seqCanvas.getFeatureRenderer(); // consider // higher -- 1.7.10.2