8011686: AWT accidentally disables the NSApplicationDelegate of SWT, causing loss of OS X integration functionality
Reviewed-by: anthony, serb
Contributed-by: Markus Persson <markus.persson@oracle.com>
--- a/jdk/src/macosx/native/sun/awt/awt.m Wed Apr 17 11:24:40 2013 -0700
+++ b/jdk/src/macosx/native/sun/awt/awt.m Thu Apr 18 15:09:59 2013 +0100
@@ -316,7 +316,10 @@
// its finishLaunching has initialized it.
// ApplicationDelegate is the support code for com.apple.eawt.
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
- OSXAPP_SetApplicationDelegate([ApplicationDelegate sharedDelegate]);
+ id<NSApplicationDelegate> delegate = [ApplicationDelegate sharedDelegate];
+ if (delegate != nil) {
+ OSXAPP_SetApplicationDelegate(delegate);
+ }
}];
}