aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/javax/swing/MenuSelectionManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/javax/swing/MenuSelectionManager.java')
-rw-r--r--libjava/classpath/javax/swing/MenuSelectionManager.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/libjava/classpath/javax/swing/MenuSelectionManager.java b/libjava/classpath/javax/swing/MenuSelectionManager.java
index df7b420..beafbf4 100644
--- a/libjava/classpath/javax/swing/MenuSelectionManager.java
+++ b/libjava/classpath/javax/swing/MenuSelectionManager.java
@@ -258,6 +258,9 @@ public class MenuSelectionManager
{
MenuElement[] selection = (MenuElement[])
selectedPath.toArray(new MenuElement[selectedPath.size()]);
+ if (selection.length == 0)
+ return;
+
MenuElement[] path;
for (int index = selection.length - 1; index >= 0; index--)
{