Skip to content

Commit

Permalink
Fix NullPointerException with renderArmorExtras and Bspkrs's main menu.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander committed May 8, 2015
1 parent 2af24d5 commit 1a818f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/armor/ArmorProxyClient.java
Expand Up @@ -481,7 +481,7 @@ void renderArmorExtras(RenderPlayerEvent.SetArmorModel event) {
float limbSwingMod = player.limbSwing - player.limbSwingAmount * (1.0F - partialTick);
//TPlayerStats stats = TPlayerStats.get(player);
ArmorExtended armor = ArmorProxyClient.armorExtended; //TODO: Do this for every player, not just the client
if (armor.inventory[1] != null) {
if (armor != null && armor.inventory[1] != null) {
Item item = armor.inventory[1].getItem();
ModelBiped model = item.getArmorModel(player, armor.inventory[1], 4);

Expand All @@ -494,7 +494,7 @@ void renderArmorExtras(RenderPlayerEvent.SetArmorModel event) {
}
}

if (armor.inventory[3] != null) {
if (armor != null && armor.inventory[3] != null) {
Item item = armor.inventory[3].getItem();
ModelBiped model = item.getArmorModel(player, armor.inventory[3], 5);

Expand Down

0 comments on commit 1a818f6

Please sign in to comment.