From 744014276af43dfd7ce765b9b350b43be4ebc93e Mon Sep 17 00:00:00 2001 From: ptbrunet Date: Tue, 26 May 2015 13:42:41 -0500 Subject: [PATCH] 8078408: Java version applet hangs with Voice over turned on Summary: add null check to fix NPE Reviewed-by: prr, serb, alexsch Contributed-by: peter.brunet@oracle.com --- src/macosx/classes/sun/lwawt/macosx/CAccessibility.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/macosx/classes/sun/lwawt/macosx/CAccessibility.java b/src/macosx/classes/sun/lwawt/macosx/CAccessibility.java index 736a1ffbb..d3ab6a651 100644 --- a/src/macosx/classes/sun/lwawt/macosx/CAccessibility.java +++ b/src/macosx/classes/sun/lwawt/macosx/CAccessibility.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -630,7 +630,7 @@ class CAccessibility implements PropertyChangeListener { if (!allowIgnored) { final AccessibleRole role = context.getAccessibleRole(); - if (role != null && ignoredRoles.contains(roleKey(role))) { + if (role != null && ignoredRoles != null && ignoredRoles.contains(roleKey(role))) { // Get the child's unignored children. _addChildren(child, whichChildren, false, childrenAndRoles); } else { -- GitLab