Bug 278375 [ui] NPE on photo demo shutdown
NPE because the restore location is not set. PW
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/Workbench.java
factories[offset++] = factories[i];
				factories[i] = tmp;
			}
		}
		for (int i = 0; i < factories.length; i++) {
			PartFactory factory = null;
			try {
				factory = (PartFactory) factories[i]
						.createExecutableExtension("class"); 
			} catch (CoreException e) {
				e.printStackTrace();
			}
			if (factory != null) {
				factory.init(r, context, f);
				r.addPartFactory(factory);
			}
		}
	}
	public void createGUI(MPart part) {
		if (renderer == null) {
			renderer = new PartRenderer(contributionFactory, workbenchContext);
			initializeRenderer(registry, renderer, workbenchContext,
					contributionFactory);
		}
		renderer.createGui(part);
		if (part instanceof MWindow) {
			MWindow wbw = (MWindow) part;
			Object appWindow = wbw.getWidget();
			rv = 0;