Bug 275681 NPE in DialogTab, it doesn't check for null returned by PrintDialog#open
SWT 3.5 RC0 Run control example switch to dialog tab open a print dialog hit escape (or close the dialog by clicking on the cancel button) Exception in thread "main" java.lang.NullPointerException at org.eclipse.swt.examples.controlexample.DialogTab.createButtonSelected(DialogTab.java:191) at org.eclipse.swt.examples.controlexample.DialogTab$2.widgetSelected(DialogTab.java:384) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473) at org.eclipse.swt.examples.controlexample.ControlExample.main(ControlExample.java:210)
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/DialogTab.java
textWidget.append ("getStartPage() = " + dialog.getStartPage() + Text.DELIMITER);
			textWidget.append ("getEndPage() = " + dialog.getEndPage() + Text.DELIMITER);
			textWidget.append ("getPrintToFile() = " + dialog.getPrintToFile() + Text.DELIMITER);
			textWidget.append ("result.fileName = " + result.fileName + Text.DELIMITER);
			textWidget.append ("result.orientation = " + (result.orientation == PrinterData.LANDSCAPE ? "PrinterData.LANDSCAPE" : "PrinterData.PORTRAIT") + Text.DELIMITER);
			textWidget.append ("result.copyCount = " + result.copyCount + Text.DELIMITER);
			textWidget.append ("result.collate = " + result.collate + Text.DELIMITER + Text.DELIMITER);
			return;
		}
	
		if (name.equals(ControlExample.getResourceString("MessageBox"))) {
			MessageBox dialog = new MessageBox (shell, style);
			dialog.setMessage (ControlExample.getResourceString("Example_string"));
			dialog.setText (ControlExample.getResourceString("Title"));
			int result = dialog.open ();
			textWidget.append (ControlExample.getResourceString("MessageBox") + Text.DELIMITER);
			/*
			 * The resulting integer depends on the original
			 * dialog style.  Decode the result and display it.
			 */
			switch (result) {
				case SWT.OK:
					textWidget.append (ControlExample.getResourceString("Result", new String [] {"SWT.OK"}));
					break;
				case SWT.YES:
					textWidget.append (ControlExample.getResourceString("Result", new String [] {"SWT.YES"}));
					break;
				case SWT.NO:
					textWidget.append (ControlExample.getResourceString("Result", new String [] {"SWT.NO"}));
					break;