changeset 9869:8964899ef8ae

8032864: [macosx] sigsegv (0Xb) Being Generated When Starting JDev With Voiceover Running Reviewed-by: anthony, serb
author pchelko
date Tue, 22 Jul 2014 17:10:50 +0400
parents 6e223d48080e
children d227670ae017
files src/macosx/native/sun/awt/JavaComponentAccessibility.m
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/native/sun/awt/JavaComponentAccessibility.m	Thu Jul 24 12:23:52 2014 +0400
+++ b/src/macosx/native/sun/awt/JavaComponentAccessibility.m	Tue Jul 22 17:10:50 2014 +0400
@@ -1122,7 +1122,10 @@
     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];