From 3e1026e9e2cf5e0be62113d34fc446e6dec5227b Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Sun, 18 Sep 2016 12:43:51 +0100 Subject: [PATCH] JAL-1795 JAL-2206 prevent NPE when no data returned from Ensembl fetch --- src/jalview/ext/ensembl/EnsemblGene.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/jalview/ext/ensembl/EnsemblGene.java b/src/jalview/ext/ensembl/EnsemblGene.java index 50e1032..0c20e12 100644 --- a/src/jalview/ext/ensembl/EnsemblGene.java +++ b/src/jalview/ext/ensembl/EnsemblGene.java @@ -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); -- 1.7.10.2