From a5e2b3c3fbfad3801e2f6f1a09bed7eb1ba7cbb3 Mon Sep 17 00:00:00 2001 From: Petr Pchelko Date: Tue, 22 Jul 2014 17:10:50 +0400 Subject: [PATCH] 8032864: [macosx] sigsegv (0Xb) Being Generated When Starting JDev With Voiceover Running Reviewed-by: anthony, serb --- jdk/src/macosx/native/sun/awt/JavaComponentAccessibility.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jdk/src/macosx/native/sun/awt/JavaComponentAccessibility.m b/jdk/src/macosx/native/sun/awt/JavaComponentAccessibility.m index e0de79524e8..1b3ec43a9fe 100644 --- a/jdk/src/macosx/native/sun/awt/JavaComponentAccessibility.m +++ b/jdk/src/macosx/native/sun/awt/JavaComponentAccessibility.m @@ -1108,7 +1108,10 @@ static NSObject *sAttributeNamesLOCK = nil; JNIEnv *env = [ThreadUtilities getJNIEnv]; id value = nil; + NSWindow* hostWindow = [[self->fView window] retain]; jobject focused = JNFCallStaticObjectMethod(env, jm_getFocusOwner, fComponent); // AWT_THREADING Safe (AWTRunLoop) + [hostWindow release]; + if (focused != NULL) { if (JNFIsInstanceOf(env, focused, &sjc_Accessible)) { value = [JavaComponentAccessibility createWithAccessible:focused withEnv:env withView:fView];