JAL-3551 null pointer defence while structure files loading; comments
[jalview.git] / src / jalview / gui / AppJmolBinding.java
index 3298509..98787cb 100644 (file)
@@ -93,6 +93,11 @@ public class AppJmolBinding extends JalviewJmolBinding
   @Override
   public void refreshGUI()
   {
+    if (getMappedStructureCount() == 0)
+    {
+      // too soon!
+      return;
+    }
     // appJmolWindow.repaint();
     javax.swing.SwingUtilities.invokeLater(new Runnable()
     {