From e2e5b7499330f75dc5fb6e42c96555cbd15ed807 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 28 Jan 2014 12:46:06 +0100 Subject: 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 --- qadevOOo/runner/util/AccessibilityTools.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'qadevOOo') 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 +} -- cgit v1.2.3