From f8ce78dc02ce9d96129fcc4882749f43869928ff Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Tue, 7 Jul 2015 16:18:41 +0100 Subject: [PATCH] JAL-1769 fixed output to jalview (.jpv) file in headless mode. Initial cause of failure: NPE while trying to save varna viewers (Desktop.destop is null in headless mode) --- src/jalview/gui/Jalview2XML.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index be56292..e4ec30b 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -1372,6 +1372,10 @@ public class Jalview2XML final SequenceI jds, List viewIds, AlignmentPanel ap, boolean storeDataset) { + if (Desktop.desktop == null) + { + return; + } JInternalFrame[] frames = Desktop.desktop.getAllFrames(); for (int f = frames.length - 1; f > -1; f--) { -- 1.7.10.2