JAL-2154 check if the desktop is constructed before trying to clear it !
authorJim Procter <jprocter@issues.jalview.org>
Sat, 13 Aug 2016 15:59:34 +0000 (16:59 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Sat, 13 Aug 2016 15:59:34 +0000 (16:59 +0100)
test/jalview/io/Jalview2xmlBase.java

index d774f87..1ec34e4 100644 (file)
@@ -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)