Project: Eclipse_Platform_UI
Bug 13749 NPE on opening a multipage editor. MultiPageEditorPart isDirty should check for null
Reported: 2002-04-13 18:56:56 | Status: verified fixed

Using the 4/12 integration build, it appears "isDirty" is sometimes called in MulitPageEditorPart before there are any nestedEditors, so it should be checked to be sure its not null, before calling iterator on it. (or alternatively, to make sure nestedEditors is always intialized so iterator would simply return a zero length iterator -- it currently isn't initialized until a page is added). I have not seen this occur on the "built in" multipage editors (e.g. PDE), but does occur in our Mutlipage XML editor in WSAD (and we have created our own subclass of MulitPageEditorPart). So, there may be something about the start up init sequence we've inadvertently changed, but seems reasonable make sure nestedEditors isn't null before using it. A work-around is to subclass 'isDirty' and catch the NPE and ignore it.

Files changed in fix:
bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/part/MultiPageEditorPart.java