Bug 324230 NPE thrown when unrendering an MPartSashContainer that contains unrendered children
java.lang.NullPointerException at org.eclipse.e4.ui.workbench.renderers.swt.SashRenderer.hideChild(SashRenderer.java:317) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:517) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:528)
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/SashRenderer.java
MUIElement[] elements = SashRenderer.getModelElements(sf);
		if (elements.length <= 1)
			return;
		int totalModelWeight = 0;
		for (MUIElement element : elements) {
			totalModelWeight += getWeight(element);
		}
		int[] w = sf.getWeights();
		int totalSashWeight = 0;
		for (int weight : w) {
			totalSashWeight += weight;
		}
		
		double ratio = (double) totalModelWeight / totalSashWeight;
		int totalAdded = 0;
		for (int i = 0; i < w.length; i++) {
			int newWeight = (int) (w[i] * ratio);
			
			
			if (i == (w.length - 1))
				newWeight = totalModelWeight - totalAdded;
			elements[i].setContainerData(Integer.toString(newWeight));
			totalAdded += newWeight;
		}
		
		
	}
}