diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-28 12:46:06 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-28 15:54:49 +0100 |
commit | e2e5b7499330f75dc5fb6e42c96555cbd15ed807 (patch) | |
tree | f643f582a3d1ef5bf3633b25254a40b0a6f438e6 /qadevOOo | |
parent | fef7cbd5d5057fb88e46f967739447cf26c00b8e (diff) |
Explicit null check
Seen this cause JunitTest_sc_unoapi once with a NullPointerException, though I
do not know whether ac can legitimately be null here.
Change-Id: I1ca40dfca2d1a597842fba011a813be8154d8dd8
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/runner/util/AccessibilityTools.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/qadevOOo/runner/util/AccessibilityTools.java b/qadevOOo/runner/util/AccessibilityTools.java index 85cd442a3b84..1b59b251181d 100644 --- a/qadevOOo/runner/util/AccessibilityTools.java +++ b/qadevOOo/runner/util/AccessibilityTools.java @@ -110,7 +110,9 @@ public class AccessibilityTools { public static XAccessibleContext getAccessibleObjectForRoleIgnoreShowing_(XAccessible xacc, short role) { XAccessibleContext ac = xacc.getAccessibleContext(); - + if (ac == null) { + return null; + } if (ac.getAccessibleRole() == role) { SearchedAccessible = xacc; return ac; @@ -443,4 +445,4 @@ public class AccessibilityTools { private static void logging(PrintWriter log, String content){ if (debug) log.println(content); } -}
\ No newline at end of file +} |