JAL-1769 fixed output to jalview (.jpv) file in headless mode. Initial cause of failu...
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Tue, 7 Jul 2015 15:18:41 +0000 (16:18 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Tue, 7 Jul 2015 15:18:41 +0000 (16:18 +0100)
src/jalview/gui/Jalview2XML.java

index be56292..e4ec30b 100644 (file)
@@ -1372,6 +1372,10 @@ public class Jalview2XML
           final SequenceI jds, List<String> viewIds, AlignmentPanel ap,
           boolean storeDataset)
   {
+    if (Desktop.desktop == null)
+    {
+      return;
+    }
     JInternalFrame[] frames = Desktop.desktop.getAllFrames();
     for (int f = frames.length - 1; f > -1; f--)
     {