changeset 6426:c2522d149ff6 jdk7u40-b31

8011686: [macosx] AWT accidentally disables the NSApplicationDelegate of SWT, causing loss of OS X integration functionality Reviewed-by: anthony, serb
author pchelko
date Wed, 26 Jun 2013 12:47:44 +0400
parents 27808c388ea3
children 3a8f9e7f331f d6179d8024a8
files src/macosx/native/sun/awt/awt.m
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/native/sun/awt/awt.m	Wed Jun 26 11:39:53 2013 +0400
+++ b/src/macosx/native/sun/awt/awt.m	Wed Jun 26 12:47:44 2013 +0400
@@ -317,8 +317,11 @@
         // 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);
+            }
+        }];
     }
 }