Bug 336139 NPE thrown when trying to render a trim with unidentified elements
java.lang.NullPointerException at org.eclipse.e4.ui.workbench.renderers.swt.TrimBarLayout.isStatusLine(TrimBarLayout.java:245) at org.eclipse.e4.ui.workbench.renderers.swt.TrimBarLayout.computeSize(TrimBarLayout.java:146) at org.eclipse.e4.ui.workbench.renderers.swt.TrimBarLayout.access$0(TrimBarLayout.java:142) at org.eclipse.e4.ui.workbench.renderers.swt.TrimBarLayout$TrimLine.addControl(TrimBarLayout.java:36) at org.eclipse.e4.ui.workbench.renderers.swt.TrimBarLayout.computeSize(TrimBarLayout.java:104) at org.eclipse.swt.widgets.Composite.computeSize(Composite.java:233) at org.eclipse.e4.ui.workbench.renderers.swt.TrimmedPartLayout.layout(TrimmedPartLayout.java:120) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1263) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1249) at org.eclipse.swt.widgets.Composite.layout(Composite.java:664) at org.eclipse.swt.widgets.Composite.layout(Composite.java:622) at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.postProcess(WBWRenderer.java:585)
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/TrimBarLayout.java
}
	}
	/**
	 * @param curLine
	 * @param bounds
	 */
	private void tileLine(TrimLine curLine, Rectangle bounds) {
		int curX = bounds.x;
		int curY = bounds.y;
		for (Control ctrl : curLine.ctrls) {
			Point ctrlSize = curLine.sizeMap.get(ctrl);
			boolean zeroSize = ctrlSize.x == 0 && ctrlSize.y == 0;
			
			if (isSpacer(ctrl)) {
				int extra = curLine.extraSpace / curLine.spacerCount--;
				if (horizontal)
					ctrlSize.x += extra;
				else
					ctrlSize.y += extra;
				curLine.extraSpace -= extra;
				curLine.spacerCount--;
			}
			if (horizontal) {
				int offset = (curLine.minor - ctrlSize.y) / 2;
				if (!zeroSize)
					ctrl.setBounds(curX, curY + offset, ctrlSize.x, ctrlSize.y);
				else
					ctrl.setBounds(curX, curY, 0, 0);
				curX += ctrlSize.x;
			} else {