From: jprocter Date: Thu, 16 Sep 2010 11:53:45 +0000 (+0000) Subject: patch to prevent NPE - which occurs if no features are available (see JAL-650) X-Git-Tag: Release_2_6~36 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=2cc0c155f1e785ce3d53529bb4375d4ddf1e8cc9;p=jalview.git patch to prevent NPE - which occurs if no features are available (see JAL-650) --- 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