Project: Eclipse_Platform_UI
Bug 67293 [Themes] Setting inital theme to a bad theme id results in IThemeManager.getCurrentTheme() == null
Reported: 2004-06-15 12:41:36 | Status: verified fixed

RC2 I get the following stack when trying to launch the browser example in RC2. It's happening because PlatformUI.getWorkbench().getThemeManager().getCurrentTheme(); is returning null and it should never do that. Thread [main] (Suspended (exception NullPointerException)) DefaultEditorPresentation.updateGradient() line: 175 DefaultEditorPresentation(DefaultPartPresentation).init() line: 400 DefaultEditorPresentation.<init>(Composite, IStackPresentationSite) line: 116 WorkbenchPresentationFactory.createEditorPresentation(Composite, IStackPresentationSite) line: 33 PresentationFactoryUtil.createPresentation(AbstractPresentationFactory, int, Composite, IStackPresentationSite, IPresentationSerializer, IMemento) line: 38 EditorStack(PartStack).createControl(Composite) line: 364 EditorSashContainer(PartSashContainer).createControl(Composite) line: 432 EditorSashContainer.createControl(Composite) line: 351 EditorAreaHelper.<init>(WorkbenchPage) line: 47 WorkbenchPage.init(WorkbenchWindow, String, IAdaptable) line: 1876 WorkbenchPage.<init>(WorkbenchWindow, String, IAdaptable) line: 414 WorkbenchWindow.busyOpenPage(String, IAdaptable) line: 494 WorkbenchWindow$3.run() line: 1073 BusyIndicator.showWhile(Display, Runnable) line: 69 WorkbenchWindow.openPage(String, IAdaptable) line: 1070 Workbench.openFirstTimeWindow() line: 989 WorkbenchConfigurer.openFirstTimeWindow() line: 174 BrowserAdvisor(WorkbenchAdvisor).openWindows() line: 658 BrowserAdvisor.openWindows() line: 167 Workbench.init(Display) line: 816 Workbench.runUI() line: 1310 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 252 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 141 BrowserApp.run(Object) line: 67 PlatformActivator$1.run(Object) line: 334 EclipseStarter.run(Object) line: 272 EclipseStarter.run(String[], Runnable) line: 128 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Main.basicRun(String[]) line: 185 Main.run(String[]) line: 638 Main.main(String[]) line: 622

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/WorkbenchThemeManager.java