changeset 10480:ffaf9f05814b

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 83d8816541de
children 778011f0632c
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	Tue Jul 22 13:23:01 2014 +0400
+++ b/src/macosx/native/sun/awt/JavaComponentAccessibility.m	Tue Jul 22 17:10:50 2014 +0400
@@ -1108,7 +1108,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];