Fix potential NPE in villager skin registry.

This commit is contained in:
LexManos 2013-07-16 10:32:29 -07:00
parent 136e2180f7
commit 9de739723f

View file

@ -173,7 +173,7 @@ public class VillagerRegistry
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public static ResourceLocation getVillagerSkin(int villagerType, ResourceLocation defaultSkin) public static ResourceLocation getVillagerSkin(int villagerType, ResourceLocation defaultSkin)
{ {
if (instance().newVillagers.containsKey(villagerType)) if (instance().newVillagers != null && instance().newVillagers.containsKey(villagerType))
{ {
return instance().newVillagers.get(villagerType); return instance().newVillagers.get(villagerType);
} }