changeset 7776:8fc31fdab4d7

[Accessibility] WinAccessible#NavigateListView should not call ITEM_AT_INDEX with out of index value
author Felipe Heidrich <felipe.heidrich@oracle.com>
date Fri, 22 Aug 2014 10:06:22 -0700
parents 1beb181cb557
children 405f1f046967
files modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java	Fri Aug 22 09:49:44 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java	Fri Aug 22 10:06:22 2014 -0700
@@ -923,6 +923,7 @@
             case NavigateDirection_FirstChild: index = 0; break;
             case NavigateDirection_LastChild: index = count - 1; break;
         }
+        if (!(0 <= index && index < count)) return 0;
         Node node = (Node)listAccessible.getAttribute(ITEM_AT_INDEX, index);
         return getNativeAccessible(node);
     }