summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorLakshmi Shanmugam2011-07-26 09:53:12 (EDT)
committer Lakshmi Shanmugam2011-07-27 04:42:31 (EDT)
commit088c790db90f4fa52ce003e223a41c7ccdfd384a (patch)
treec7a4755611ca48c96ea68db84918aba50c2efc72
parentb410bcb64344fd14ed42ee18e913e54ff7097351 (diff)
downloadeclipse.platform.swt-088c790db90f4fa52ce003e223a41c7ccdfd384a.zip
eclipse.platform.swt-088c790db90f4fa52ce003e223a41c7ccdfd384a.tar.gz
eclipse.platform.swt-088c790db90f4fa52ce003e223a41c7ccdfd384a.tar.bz2
Bug 352860 - NullPointerException when closing using system menu item
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java
index d12c0bf..ce62d49 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java
@@ -564,6 +564,8 @@ void sendSelection () {
Event event = new Event ();
sendSelectionEvent (SWT.Selection, event, nsItemAction != 0);
+ // Widget may be disposed at this point
+ if (isDisposed()) return;
if (nsItemAction != 0) {
if (event.doit) {
NSApplication app = NSApplication.sharedApplication();