changeset 7388:1922cb4a63e9

8032864: [macosx] sigsegv (0Xb) Being Generated When Starting JDev With Voiceover Running Reviewed-by: anthony, serb
author van
date Thu, 07 Aug 2014 22:16:57 -0700
parents 42589a83bbfe
children 2590a9c18fdb
files src/macosx/native/sun/awt/JavaComponentAccessibility.m
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/native/sun/awt/JavaComponentAccessibility.m	Sat Aug 09 01:22:45 2014 +0400
+++ b/src/macosx/native/sun/awt/JavaComponentAccessibility.m	Thu Aug 07 22:16:57 2014 -0700
@@ -1122,7 +1122,9 @@
     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];