JAL-1795 JAL-2206 prevent NPE when no data returned from Ensembl fetch
authorJim Procter <jprocter@issues.jalview.org>
Sun, 18 Sep 2016 11:43:51 +0000 (12:43 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Sun, 18 Sep 2016 11:43:51 +0000 (12:43 +0100)
src/jalview/ext/ensembl/EnsemblGene.java

index 50e1032..0c20e12 100644 (file)
@@ -118,7 +118,10 @@ public class EnsemblGene extends EnsemblSeqProxy
        * fetch the gene sequence(s) with features and xrefs
        */
       AlignmentI geneAlignment = super.getSequenceRecords(geneId);
-
+      if (geneAlignment == null)
+      {
+        continue;
+      }
       if (geneAlignment.getHeight() == 1)
       {
         getTranscripts(geneAlignment, geneId);