Moved service disposal down
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
index 740bcda..1c6b3e4 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
@@ -1401,17 +1401,17 @@
 			final IContextService contextService = (IContextService) workbench
 					.getAdapter(IContextService.class);
 			contextService.unregisterShell(getShell());
-			
-			// Bring down all of the services.
-			serviceLocator.dispose();
 
 			closeAllPages();
-
+			
 			fireWindowClosed();
 
 			getActionBarAdvisor().dispose();
 			getWindowAdvisor().dispose();
 			detachedWindowShells.dispose();
+			
+			// Bring down all of the services.
+			serviceLocator.dispose();
 
 			// Null out the progress region. Bug 64024.
 			progressRegion = null;