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
*/
    protected IWizard getWizard() {
        return wizard;
    }
    /**
     * Closes this window.
     *
     * @return <code>true</code> if the window is (or was already) closed, 
     *   and <code>false</code> if it is still open
     */
    private boolean hardClose() {
        
        for (int i = 0; i < createdWizards.size(); i++) {
            IWizard createdWizard = (IWizard) createdWizards.get(i);
            createdWizard.dispose();
            
            
            
            
            createdWizard.setContainer(null);
        }
        return super.close();
    }
    /**
     * The Help button has been pressed.
     */
    protected void helpPressed() {
        if (currentPage != null) {
            currentPage.performHelp();
        }