From: Jim Procter Date: Wed, 25 Sep 2013 15:10:43 +0000 (+0100) Subject: JAL-1270 Desktop.instance is null during headless jalview tests X-Git-Tag: Jalview_2_9~200^2~21^2~8 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=be7129c40859bc2434e59ad0a54149c99ea569ef;p=jalview.git JAL-1270 Desktop.instance is null during headless jalview tests --- 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; }