Bug 242466 [JFace] Widget is disposed error when closing dialog from OSX dock
- run the snippet below which shows a dialog - right-click its icon in the OSX dock and select Quit -> the exception at the bottom will be spewed - it looks like the last line of Window.runEventLoop(Shell) should change from: display.update(); to... if (!display.isDisposed()) display.update(); snippet: public static void main (String [] args) { try { final Display display = new Display (); final Shell shell = new Shell (display); TitleAreaDialog dialog = new TitleAreaDialog(shell); dialog.setBlockOnOpen(true); dialog.open(); display.dispose (); } catch (Exception e) { e.printStackTrace(); } } exception: org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:3777) at org.eclipse.swt.SWT.error(SWT.java:3695) at org.eclipse.swt.SWT.error(SWT.java:3666) at org.eclipse.swt.widgets.Display.error(Display.java:1126) at org.eclipse.swt.widgets.Display.checkDevice(Display.java:626) at org.eclipse.swt.widgets.Display.update(Display.java:4084) at org.eclipse.jface.window.Window.runEventLoop(Window.java:832) at org.eclipse.jface.window.Window.open(Window.java:801) at win32.Main1.main(Main1.java:20)
bundles/org.eclipse.jface/src/org/eclipse/jface/window/Window.java
* Sets the default image. This is the image that will be used for windows
	 * that have no shell image at the time they are opened. There is no default
	 * image unless one is installed via this method.
	 * 
	 * @param image
	 *            the default image, or <code>null</code> if none
	 */
	public static void setDefaultImage(Image image) {
		defaultImages = image == null ? null : new Image[] { image };
	}
	/**
	 * Sets the array of default images to use for newly opened windows. It is
	 * expected that the array will contain the same icon rendered at different
	 * resolutions.
	 * 
	 * @see org.eclipse.swt.widgets.Decorations#setImages(org.eclipse.swt.graphics.Image[])
	 * 
	 * @param images
	 *            the array of images to be used when this window is opened
	 * @since 3.0
	 */
	public static void setDefaultImages(Image[] images) {
		Image[] newArray = new Image[images.length];
		System.arraycopy(images, 0, newArray, 0, newArray.length);
		defaultImages = newArray;
	}
	
	/**
     * Changes the parent shell. This is only safe to use when the shell is not
     * yet realized (i.e., created). Once the shell is created, it must be