Fix potential NPE in Custom item entity span code caused by item id misconfigurations.

This commit is contained in:
LexManos 2012-09-17 04:56:26 -07:00
parent 61c21218e2
commit de24eea885

View file

@ -13,7 +13,7 @@ public class ForgeInternalHandler
if (entity instanceof EntityItem)
{
ItemStack item = ((EntityItem)entity).item;
if (item.getItem().hasCustomEntity(item))
if (item != null && item.getItem().hasCustomEntity(item))
{
Entity newEntity = item.getItem().createEntity(event.world, entity, item);
if (newEntity != null)