From be7129c40859bc2434e59ad0a54149c99ea569ef Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 25 Sep 2013 16:10:43 +0100 Subject: [PATCH] JAL-1270 Desktop.instance is null during headless jalview tests --- src/jalview/gui/Desktop.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 877aebb..322365c 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -647,8 +647,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements // A HEADLESS STATE WHEN NO DESKTOP EXISTS. MUST RETURN // IF JALVIEW IS RUNNING HEADLESS // /////////////////////////////////////////////// - if (System.getProperty("java.awt.headless") != null - && System.getProperty("java.awt.headless").equals("true")) + if (instance == null || (System.getProperty("java.awt.headless") != null + && System.getProperty("java.awt.headless").equals("true"))) { return; } -- 1.7.10.2