Permalink
Browse files

Fixed a bug where blast door auto-scan mode would cause a crash if th…

…e player was not holding a security tuner.
  • Loading branch information...
Ri5ux committed Nov 5, 2017
1 parent 7aa52c6 commit 32b6dd7ec9b3bd57f12188c7159b28beb365d6cb
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/org/avp/tile/TileEntityBlastdoor.java
@@ -602,7 +602,7 @@ public boolean playerHoldingRequiredSecurityTuner(EntityPlayer player)
{
ItemStack itemstack = player.getHeldItemMainhand();
if (itemstack.getItem() == AliensVsPredator.items().securityTuner)
if (itemstack != null && itemstack.getItem() == AliensVsPredator.items().securityTuner)
{
NBTTagCompound tag = itemstack.getTagCompound() != null ? itemstack.getTagCompound() : new NBTTagCompound();
return tag.getString("BindKey").equals(this.bindKey) || this.bindKey.isEmpty();

0 comments on commit 32b6dd7

Please sign in to comment.