From: tzvanaalten Date: Wed, 23 Aug 2017 14:36:07 +0000 (+0100) Subject: JAL-2629 fix for addHMMConsensus failing if no HMM sequences found X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d4db66b0d4d89405bc90aa999e15debc7bf85659;p=jalview.git JAL-2629 fix for addHMMConsensus failing if no HMM sequences found --- diff --git a/src/jalview/hmmer/HMMERCommands.java b/src/jalview/hmmer/HMMERCommands.java index 6a538fc..913eee8 100644 --- a/src/jalview/hmmer/HMMERCommands.java +++ b/src/jalview/hmmer/HMMERCommands.java @@ -160,6 +160,10 @@ public class HMMERCommands public void addHMMConsensusSequences(AlignFrame af) { AlignmentI al = af.getViewport().getAlignment(); + if (hmmSeqs == null || hmmSeqs.size() < 1) + { + return; + } for (SequenceI seq : hmmSeqs) { Integer position = seq.getPreviousPosition(); @@ -169,6 +173,7 @@ public class HMMERCommands af.alignPanel.adjustAnnotationHeight(); af.getViewport().updateSequenceIdColours(); af.buildSortByAnnotationScoresMenu(); + af.getViewport().initInformation(); } /**