From: Jim Procter Date: Fri, 20 Oct 2017 14:28:08 +0000 (+0100) Subject: JAL-547 fix NPE when no selection available X-Git-Tag: Release_2_10_3b1~102^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e15398ef85fbd7d33fd622717c37560c39b4ca4e;p=jalview.git JAL-547 fix NPE when no selection available --- 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