Jalview-JS/JAL-3253-applet Desktop fix for null desktopPane in testing
authorhansonr <hansonr@STO24954W.ad.stolaf.edu>
Fri, 10 May 2019 02:51:19 +0000 (21:51 -0500)
committerhansonr <hansonr@STO24954W.ad.stolaf.edu>
Fri, 10 May 2019 02:51:19 +0000 (21:51 -0500)
src/jalview/gui/Desktop.java

index 38cdf35..c76c396 100644 (file)
@@ -1514,6 +1514,10 @@ public class Desktop extends jalview.jbgui.GDesktop
   @Override
   public void closeAll_actionPerformed(ActionEvent e)
   {
+    if (getDesktopPane() == null)
+    {
+      return;
+    }
     // TODO show a progress bar while closing?
     JInternalFrame[] frames = getDesktopPane().getAllFrames();
     for (int i = 0; i < frames.length; i++)