From ef3475e9a95da7e3af80ae155b1b14069311645c Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Sat, 13 Aug 2016 16:59:34 +0100 Subject: [PATCH] JAL-2154 check if the desktop is constructed before trying to clear it ! --- test/jalview/io/Jalview2xmlBase.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/jalview/io/Jalview2xmlBase.java b/test/jalview/io/Jalview2xmlBase.java index d774f87..1ec34e4 100644 --- a/test/jalview/io/Jalview2xmlBase.java +++ b/test/jalview/io/Jalview2xmlBase.java @@ -41,7 +41,10 @@ public class Jalview2xmlBase @BeforeTest(alwaysRun = true) public static void clearDesktop() { - Desktop.instance.closeAll_actionPerformed(null); + if (Desktop.instance != null && Desktop.getAlignFrames() != null) + { + Desktop.instance.closeAll_actionPerformed(null); + } } public int countDsAnn(jalview.viewmodel.AlignmentViewport avp) -- 1.7.10.2