From 44c7ef22fc8e06469384f0d878683ce0e8615b11 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 16 Aug 2016 15:30:40 +0100 Subject: [PATCH] =?utf8?q?JAL-2154=20check=20alignment=20isn=E2=80=99t=20nul?= =?utf8?q?l=20before=20validating?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- test/jalview/datamodel/AlignmentTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/jalview/datamodel/AlignmentTest.java b/test/jalview/datamodel/AlignmentTest.java index 09645fd..d3525a5 100644 --- a/test/jalview/datamodel/AlignmentTest.java +++ b/test/jalview/datamodel/AlignmentTest.java @@ -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(); -- 1.7.10.2