Bug 336684 [JFace] NPE in Tray Dialog
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/TrayDialog.java
}
		final Shell shell = getShell();
		Control focusControl = shell.getDisplay().getFocusControl();
		if (isContained(trayControl, focusControl) && nonTrayFocusControl!= null && !nonTrayFocusControl.isDisposed()) {
			nonTrayFocusControl.setFocus();
		}
		nonTrayFocusControl= null;
		shell.removeControlListener (resizeListener);
		resizeListener = null;
		final int trayWidth = trayControl.getSize().x + leftSeparator.getSize().x + sash.getSize().x + rightSeparator.getSize().x;
		trayControl.dispose();
		trayControl = null;
		tray = null;
		leftSeparator.dispose();
		leftSeparator = null;
		rightSeparator.dispose();
		rightSeparator = null;
		sash.dispose();
		sash = null;
		final Rectangle bounds = shell.getBounds();
		
		
		
		
		shell.getDisplay().asyncExec(new Runnable() {
			public void run() {
				if (!shell.isDisposed())
					shell.setBounds(bounds.x + ((getDefaultOrientation() == SWT.RIGHT_TO_LEFT) ? trayWidth : 0), bounds.y, bounds.width - trayWidth, bounds.height);
			}
		});