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
} else if (newValue != null && adapterType != null) {
					IAdapterManager adapters = (IAdapterManager) applicationContext
							.get(IAdapterManager.class.getName());
					if (adapters != null) {
						Object adapted = adapters.loadAdapter(newValue,
								adapterType.getName());
						if (adapted != null) {
							newInput = adapted;
						}
					}
				}
				return newInput;
			}
		});
		mainContext.set(IServiceConstants.ACTIVE_SHELL,
				new ActiveChildLookupFunction(IServiceConstants.ACTIVE_SHELL,
						LOCAL_ACTIVE_SHELL));
		return mainContext;
	}
	private MApplication<? extends MWindow> createWorkbenchModel(
			URI applicationDefinitionInstance) {
		URI restoreLocation = null;
		if (workbenchData != null && workbenchData.exists() && saveAndRestore) {
			restoreLocation = URI
					.createFileURI(workbenchData.getAbsolutePath());
		}
		long restoreLastModified = restoreLocation == null ? 0L : new File(
				restoreLocation.toFileString()).lastModified();
		long appLastModified = 0L;
		ResourceSetImpl resourceSetImpl = new ResourceSetImpl();