Bug 82706 [Wizards] WizardDialog: code inconsistent
As long as WizardDialog.updateTitleBar() is a public method (should it be?) it's not a bad idea to check dialog state in all appropriate places. Now: public void updateTitleBar() { String s = null; if(currentPage != null) s = currentPage.getTitle(); if (s == null) s = ""; //$NON-NLS-1$ setTitle(s); if(currentPage != null) setTitleImage(currentPage.getImage()); updateDescriptionMessage(); updateMessage(); } It accurately checks that currentPage != null, but forgets to do the same before calling of updateDescriptionMessage() method wich works with currentPage without any checking. This can cause NPE (which happened to me :-)).
bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java
private String pageDescription;
    
    private ProgressMonitorPart progressMonitorPart;
    private Cursor waitCursor;
    private Cursor arrowCursor;
    private MessageDialog windowClosingDialog;
    
    private Button backButton;
    private Button nextButton;
    private Button finishButton;
    private Button cancelButton;
    private Button helpButton;
    private SelectionAdapter cancelListener;
    private boolean isMovingToPreviousPage = false;
    private Composite pageContainer;
    private PageContainerFillLayout pageContainerLayout = new PageContainerFillLayout(
            5, 5, 300, 225);
    private int pageWidth = SWT.DEFAULT;
    private int pageHeight = SWT.DEFAULT;
    private static final String FOCUS_CONTROL = "focusControl"; 
    private boolean lockedUI = false;
	
    private ListenerList pageChangedListeners = new ListenerList(3);
    /**
     * A layout for a container which includes several pages, like
     * a notebook, wizard, or preference dialog. The size computed by
     * this layout is the maximum width and height of all pages currently
     * inserted into the container.
     */
    protected class PageContainerFillLayout extends Layout {