changeset 7802:96b05e9b6bd4

RT-38187: [a11y] Intermittent NPE running HelloSanity or SceneBuilder with Narrator Fix missing isDisposed() checks in GetFocus() and get_SelectionContainer()
author Felipe Heidrich <felipe.heidrich@oracle.com>
date Tue, 26 Aug 2014 13:56:02 -0700
parents e68dd7128fdd
children e1d0a9e30bec
files modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java	Tue Aug 26 13:49:26 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java	Tue Aug 26 13:56:02 2014 -0700
@@ -1077,6 +1077,7 @@
     }
 
     long GetFocus() {
+        if (isDisposed()) return 0;
         Node node = (Node)getAttribute(FOCUS_NODE);
         if (node == null) return 0L;
         Node item = (Node)getAccessible(node).getAttribute(FOCUS_ITEM);
@@ -1325,6 +1326,7 @@
     }
 
     long get_SelectionContainer() {
+        if (isDisposed()) return 0;
         WinAccessible acc = (WinAccessible)getContainer(); 
         return acc != null ? acc.getNativeAccessible() : 0L;
     }