From: gmungoc Date: Wed, 7 Mar 2018 11:27:20 +0000 (+0000) Subject: JAL-2925 handle empty annotation when copying group consensus X-Git-Tag: Release_2_10_4~53 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=fed436f2c7c864948aa25f59de919c5a18674c23;p=jalview.git JAL-2925 handle empty annotation when copying group consensus --- diff --git a/src/jalview/datamodel/SequenceGroup.java b/src/jalview/datamodel/SequenceGroup.java index 6b797d7..944f263 100755 --- a/src/jalview/datamodel/SequenceGroup.java +++ b/src/jalview/datamodel/SequenceGroup.java @@ -1189,9 +1189,10 @@ public class SequenceGroup implements AnnotatedCollectionI { if (consensus.annotations[i] != null) { - if (consensus.annotations[i].description.charAt(0) == '[') + String desc = consensus.annotations[i].description; + if (desc.length() > 1 && desc.charAt(0) == '[') { - seqs.append(consensus.annotations[i].description.charAt(1)); + seqs.append(desc.charAt(1)); } else {