{
SequenceI[] seqs = viewport.getAlignment().getSequencesArray();
AlignmentI dataset = viewport.getAlignment().getDataset();
+
+ showProducts.removeAll();
+ final boolean dna = viewport.getAlignment().isNucleotide();
+
+ if (seqs == null || seqs.length == 0)
+ {
+ // nothing to see here.
+ return false;
+ }
+
boolean showp = false;
try
{
- showProducts.removeAll();
- final boolean dna = viewport.getAlignment().isNucleotide();
- List<String> ptypes = (seqs == null || seqs.length == 0) ? null
- : new CrossRef(seqs, dataset)
- .findXrefSourcesForSequences(dna);
+ List<String> ptypes = new CrossRef(seqs, dataset)
+ .findXrefSourcesForSequences(dna);
for (final String source : ptypes)
{