diff --git a/src/macosx/native/sun/awt/AWTView.m b/src/macosx/native/sun/awt/AWTView.m index 6ee074f12ab15e6926618a891288897fef653789..28bdb4b9077756c5e7dd4d304acc16a9bcc0fb28 100644 --- a/src/macosx/native/sun/awt/AWTView.m +++ b/src/macosx/native/sun/awt/AWTView.m @@ -126,7 +126,7 @@ AWT_ASSERT_APPKIT_THREAD; self.cglLayer = nil; - JNIEnv *env = [ThreadUtilities getJNIEnv]; + JNIEnv *env = [ThreadUtilities getJNIEnvUncached]; (*env)->DeleteGlobalRef(env, m_cPlatformView); m_cPlatformView = NULL; diff --git a/src/macosx/native/sun/awt/AWTWindow.m b/src/macosx/native/sun/awt/AWTWindow.m index 89b0f04640bf7bea84d9f958ecf12dfa978bf8f1..c933379f14125f115347184030c52b212b9ef868 100644 --- a/src/macosx/native/sun/awt/AWTWindow.m +++ b/src/macosx/native/sun/awt/AWTWindow.m @@ -350,7 +350,7 @@ AWT_ASSERT_APPKIT_THREAD; - (void) dealloc { AWT_ASSERT_APPKIT_THREAD; - JNIEnv *env = [ThreadUtilities getJNIEnv]; + JNIEnv *env = [ThreadUtilities getJNIEnvUncached]; [self.javaPlatformWindow setJObject:nil withEnv:env]; self.nsWindow = nil;