Bug 35192 Dialog.applyDialogFont should protect itself against null arguments
RC2 Now that many plugins use this method to apply the dialog font to widgets the method should protect itself against null arguments. Normally clients create their widget tree in a method createControl and there are changes that the returned control might be null. Adding a statement Dialog.applyDialogFont (result) with result == null will result in new NPEs.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/Dialog.java
okPressed();
		else if (IDialogConstants.CANCEL_ID == buttonId)
			cancelPressed();
	}
	/**
	 * Notifies that the cancel button of this dialog has been pressed.
	 * <p>
	 * The <code>Dialog</code> implementation of this framework method sets
	 * this dialog's return code to <code>Window.CANCEL</code>
	 * and closes the dialog. Subclasses may override if desired.
	 * </p>
	 */
	protected void cancelPressed() {
		setReturnCode(CANCEL);
		close();
	}
	/**
	 * Constrain the shell size to be no larger than the display bounds.
	 * Reduce the shell size and move its origin as required.
	 * 
	 * @since 2.0
	 */
	protected void constrainShellSize() {
		
		super.constrainShellSize();
		Shell shell = getShell();
		Point size = shell.getSize();
		Rectangle bounds = shell.getDisplay().getClientArea();
		
		Point loc = shell.getLocation();