JAL-845 set split frame divider safely for eXpand Views
[jalview.git] / src / jalview / jbgui / GSplitFrame.java
index a377571..bcd5f64 100644 (file)
@@ -45,7 +45,8 @@ public class GSplitFrame extends JInternalFrame
     splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, topFrame,
             bottomFrame);
     splitPane.setVisible(true);
-    final double ratio = topFrame.getHeight()
+    final double ratio = bottomFrame.getHeight() == 0 ? 0.5d : topFrame
+            .getHeight()
             / (double) (topFrame.getHeight() + bottomFrame.getHeight());
     splitPane.setDividerLocation(ratio);
     splitPane.setResizeWeight(ratio);