JAL-2154 check if the desktop is constructed before trying to clear it !
[jalview.git] / 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)