Bug 38729 [Preferences] NPE PreferencePage isValid
getContainer may return null
bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferencePage.java
contributeButtons(buttonBar);
		if (createDefaultAndApplyButton) {
			layout.numColumns = layout.numColumns + 2;
			String[] labels = JFaceResources.getStrings(new String[] { "defaults", "apply" }); 
			int heightHint =
				convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
			int widthHint =
				convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
			defaultsButton = new Button(buttonBar, SWT.PUSH);
			defaultsButton.setFont(font);
			defaultsButton.setText(labels[0]);
			GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
			data.heightHint = heightHint;
			data.widthHint =
				Math.max(
					widthHint,
					defaultsButton.computeSize(
						SWT.DEFAULT,
						SWT.DEFAULT,
						true).x);
			defaultsButton.setLayoutData(data);
			defaultsButton.addSelectionListener(new SelectionAdapter() {
				public void widgetSelected(SelectionEvent e) {
					performDefaults();
				}
			});
			applyButton = new Button(buttonBar, SWT.PUSH);
			applyButton.setFont(font);
			applyButton.setText(labels[1]);
			data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);