From: TZVanaalten Date: Tue, 15 Aug 2017 16:30:47 +0000 (+0100) Subject: JAL-2629 prevent hmmbuild from running if there are no sequences X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f846d1d381fefac7b430554f175f8c7c41ddfe45;p=jalview.git JAL-2629 prevent hmmbuild from running if there are no sequences --- diff --git a/src/jalview/hmmer/HMMBuildThread.java b/src/jalview/hmmer/HMMBuildThread.java index ed074a8..880ed0d 100644 --- a/src/jalview/hmmer/HMMBuildThread.java +++ b/src/jalview/hmmer/HMMBuildThread.java @@ -58,7 +58,7 @@ public class HMMBuildThread implements Runnable if (alignment == null && group == null) { JOptionPane.showMessageDialog(af, - MessageManager.getString("label.no_sequence_data")); + MessageManager.getString("warn.no_sequence_data")); return; } try @@ -92,7 +92,12 @@ public class HMMBuildThread implements Runnable } array = alignment.getSequencesArray(); } - + if (array.length < 1) + { + JOptionPane.showMessageDialog(af, + MessageManager.getString("warn.no_sequence_data")); + return; + } SequenceI[] newArr = new SequenceI[array.length]; int index = 0; for (SequenceI seq : array)