JAL-2154 check alignment isn’t null before validating
authorJim Procter <jprocter@issues.jalview.org>
Tue, 16 Aug 2016 14:30:40 +0000 (15:30 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 16 Aug 2016 16:50:46 +0000 (17:50 +0100)
test/jalview/datamodel/AlignmentTest.java

index 09645fd..d3525a5 100644 (file)
@@ -115,6 +115,14 @@ public class AlignmentTest
   public static boolean verifyAlignmentDatasetRefs(AlignmentI alignment,
           boolean raiseAssert)
   {
+    if (alignment == null)
+    {
+      if (raiseAssert)
+      {
+        Assert.fail("Alignment for verification was null.");
+      }
+      return false;
+    }
     if (alignment.getDataset() != null)
     {
       AlignmentI dataset = alignment.getDataset();