From e15398ef85fbd7d33fd622717c37560c39b4ca4e Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 20 Oct 2017 15:28:08 +0100 Subject: [PATCH] JAL-547 fix NPE when no selection available --- examples/groovy/PIDmatrix.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/groovy/PIDmatrix.groovy b/examples/groovy/PIDmatrix.groovy index 3ff4b39..b97abcc 100644 --- a/examples/groovy/PIDmatrix.groovy +++ b/examples/groovy/PIDmatrix.groovy @@ -62,7 +62,7 @@ void printSimilarityMatrix(boolean selview=false, boolean includeids=true, Simil jalview.datamodel.AlignmentView seqStrings = av.getAlignmentView(selview) - if (!selview) { + if (!selview || av.getSelectionGroup()==null) { start = 0 end = av.getAlignment().getWidth() seqs = av.getAlignment().getSequencesArray() @@ -96,4 +96,4 @@ void printSimilarityMatrix(boolean selview=false, boolean includeids=true, Simil print "\n" } -} +} \ No newline at end of file -- 1.7.10.2