mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 19:39:22 +00:00
Fix potential NPE in villager skin registry.
This commit is contained in:
1 parent
136e2180f7
commit
9de739723f
1 file changed
+1
-1
@@ -173,7 +173,7 @@ public class VillagerRegistry
|
||||
@SideOnly(Side.CLIENT)
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user