Bug 319011 NPE when closing editor after closing a perspective
bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java
MUIElement parentME = element.getParent();
		if (parentME == null)
			parentME = (MUIElement) ((EObjectImpl) element).eContainer();
		if (parentME != null) {
			AbstractPartRenderer renderer = getRendererFor(parentME);
			if (renderer != null) {
				if (!element.isVisible()) {
					parent = getLimboShell();
				} else {
					parent = renderer.getUIContainer(element);
				}
			}
		}
		
		IEclipseContext parentContext = null;
		if (element.getCurSharedRef() != null) {
			MPlaceholder ph = element.getCurSharedRef();
			parentContext = getContext(ph.getParent());
		} else if (parentContext == null && element.getParent() != null) {
			parentContext = getContext(element.getParent());
		} else if (parentContext == null && element.getParent() == null) {
			getContext((MElementContainer<MUIElement>) ((EObjectImpl) element)
					.eContainer());
		}
		return createGui(element, parent, parentContext);
	}
	private Shell getLimboShell() {
		if (limbo == null)
			limbo = new Shell(Display.getCurrent(), SWT.NONE);
		return limbo;