X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fext%2Fensembl%2FEnsemblFeatures.java;h=75708221f769e6ab33d7b595421a36c8530ac16c;hb=ccbd3e0bfd34533d8e98b7ef9a6cb48d9684b3da;hp=2e1f63342804524ec92757cfc5c7f713ec55ab1e;hpb=853624fb32058cccc544ae7d13af6ad4b0800b6c;p=jalview.git
diff --git a/src/jalview/ext/ensembl/EnsemblFeatures.java b/src/jalview/ext/ensembl/EnsemblFeatures.java
index 2e1f633..7570822 100644
--- a/src/jalview/ext/ensembl/EnsemblFeatures.java
+++ b/src/jalview/ext/ensembl/EnsemblFeatures.java
@@ -1,3 +1,23 @@
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see .
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
package jalview.ext.ensembl;
import jalview.datamodel.Alignment;
@@ -65,6 +85,10 @@ class EnsemblFeatures extends EnsemblRestClient
List queries = new ArrayList();
queries.add(query);
FileParse fp = getSequenceReader(queries);
+ if (fp == null || !fp.isValid())
+ {
+ return null;
+ }
FeaturesFile fr = new FeaturesFile(fp);
return new Alignment(fr.getSeqsAsArray());
}