From f846d1d381fefac7b430554f175f8c7c41ddfe45 Mon Sep 17 00:00:00 2001 From: TZVanaalten Date: Tue, 15 Aug 2017 17:30:47 +0100 Subject: [PATCH] JAL-2629 prevent hmmbuild from running if there are no sequences --- src/jalview/hmmer/HMMBuildThread.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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) -- 1.7.10.2