From e1816aedf3cf65ac3fa1f9d25647d69c641088a4 Mon Sep 17 00:00:00 2001 From: pchelko Date: Thu, 18 Apr 2013 15:09:59 +0100 Subject: [PATCH] 8011686: AWT accidentally disables the NSApplicationDelegate of SWT, causing loss of OS X integration functionality Reviewed-by: anthony, serb Contributed-by: Markus Persson --- src/macosx/native/sun/awt/awt.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/macosx/native/sun/awt/awt.m b/src/macosx/native/sun/awt/awt.m index ea684ed08..5e7942aa0 100644 --- a/src/macosx/native/sun/awt/awt.m +++ b/src/macosx/native/sun/awt/awt.m @@ -316,7 +316,10 @@ AWT_ASSERT_APPKIT_THREAD; // its finishLaunching has initialized it. // ApplicationDelegate is the support code for com.apple.eawt. [ThreadUtilities performOnMainThreadWaiting:YES block:^(){ - OSXAPP_SetApplicationDelegate([ApplicationDelegate sharedDelegate]); + id delegate = [ApplicationDelegate sharedDelegate]; + if (delegate != nil) { + OSXAPP_SetApplicationDelegate(delegate); + } }]; } -- GitLab