Fixed potential NPE in MCU tooltip.

This commit is contained in:
Florian Nücke 2015-02-10 02:27:34 +01:00
parent 279f87a2b9
commit c05b4fc3d6

View File

@ -47,7 +47,7 @@ class Microcontroller(protected implicit val tileTag: ClassTag[tileentity.Microc
super.tooltipTail(metadata, stack, player, tooltip, advanced)
if (KeyBindings.showExtendedTooltips) {
val info = new MicrocontrollerData(stack)
for (component <- info.components) {
for (component <- info.components if component != null) {
tooltip.add("- " + component.getDisplayName)
}
}