JAL-653 JAL-966 TODO and avoid NPE when desktop instance unavailable
authorJim Procter <jprocter@dundee.ac.uk>
Thu, 19 Feb 2015 14:57:01 +0000 (14:57 +0000)
committerJames Procter <jprocter@ls30857.local>
Fri, 5 Jun 2015 11:55:27 +0000 (12:55 +0100)
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()
             {