Bug 319877 Infinite NPE can fill log file up quickly
Looks like I have ten megabytes worth of logs complaining about this NPE. I would never have noticed if I didn't open up the 'Error Log' view. java.lang.NullPointerException at org.eclipse.e4.ui.workbench.renderers.swt.ToolItemRenderer$7$1.run(ToolItemRenderer.java:378) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.e4.ui.workbench.renderers.swt.ToolItemRenderer$7.run(ToolItemRenderer.java:366) at org.eclipse.swt.widgets.Display.runTimer(Display.java:4167) at org.eclipse.swt.widgets.Display.messageProc(Display.java:3256) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2459) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:693) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:618)
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/ToolItemRenderer.java
return null;
		MToolItem itemModel = (MToolItem) element;
		
		int addIndex = calcVisibleIndex(element);
		
		MMenu menu = itemModel.getMenu();
		int flags = 0;
		if (menu != null) {
			flags |= SWT.DROP_DOWN;
		} else if (itemModel.getType() == ItemType.PUSH)
			flags |= SWT.PUSH;
		else if (itemModel.getType() == ItemType.CHECK)
			flags |= SWT.CHECK;
		else if (itemModel.getType() == ItemType.RADIO)
			flags |= SWT.RADIO;
		ToolItem newItem = new ToolItem((ToolBar) parent, flags, addIndex);
		if (itemModel.getLabel() != null)
			newItem.setText(itemModel.getLabel());
		newItem.setToolTipText(getToolTipText(itemModel));
		newItem.setImage(getImage((MUILabel) element));
		newItem.setEnabled(itemModel.isEnabled());
		newItem.setSelection(itemModel.isSelected());
		return newItem;
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer#hideChild
	 * (org.eclipse.e4.ui.model.application.MElementContainer,