JAL-653 JAL-966 TODO and avoid NPE when desktop instance unavailable
[jalview.git] / src / jalview / io / FileLoader.java
index 6329f58..aa76da5 100755 (executable)
@@ -384,7 +384,9 @@ public class FileLoader implements Runnable
 
           final String errorMessage = "Couldn't load file " + title + "\n"
                   + error;
-          if (raiseGUI)
+          // TODO: refactor FileLoader to be independent of Desktop / Applet GUI
+          // bits ?
+          if (raiseGUI && Desktop.desktop != null)
           {
             javax.swing.SwingUtilities.invokeLater(new Runnable()
             {