JAL-2236 fix: bail if no context available for subgroup
authorJim Procter <jprocter@issues.jalview.org>
Thu, 29 Sep 2016 10:53:21 +0000 (11:53 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Thu, 29 Sep 2016 10:53:21 +0000 (11:53 +0100)
src/jalview/schemes/TCoffeeColourScheme.java

index 62f3a2e..2be51c2 100644 (file)
@@ -86,6 +86,10 @@ public class TCoffeeColourScheme extends ResidueColourScheme
     seqMap = new IdentityHashMap<SequenceI, Color[]>();
     AnnotatedCollectionI alcontext = alignment instanceof AlignmentI ? alignment
             : alignment.getContext();
+    if (alcontext == null)
+    {
+      return;
+    }
     int w = 0;
     for (AlignmentAnnotation al : alcontext
             .findAnnotation(TCoffeeScoreFile.TCOFFEE_SCORE))