From: Jim Procter Date: Thu, 27 Nov 2014 10:35:58 +0000 (+0000) Subject: JAL-674 patch NPE bug when test run in isolation X-Git-Tag: Jalview_2_9~138^2~5 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=862a2b1ffe312f1d58a480c438ac5f8daae74468;p=jalview.git JAL-674 patch NPE bug when test run in isolation --- diff --git a/test/jalview/io/Jalview2xmlTests.java b/test/jalview/io/Jalview2xmlTests.java index 32aa84a..fec7d75 100644 --- a/test/jalview/io/Jalview2xmlTests.java +++ b/test/jalview/io/Jalview2xmlTests.java @@ -237,7 +237,8 @@ public class Jalview2xmlTests @Test public void gatherViewsHere() throws Exception { - int origCount = Desktop.getAlignframes().length; + int origCount = Desktop.getAlignframes() == null ? 0 : Desktop + .getAlignframes().length; AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded( "examples/exampleFile_2_7.jar", FormatAdapter.FILE); assertTrue("Didn't read in the example file correctly.", af != null);