Skip to content

Commit

Permalink
Fix unsafe getCompoundTag call in PotionLauncher.getItemUseAction
Browse files Browse the repository at this point in the history
  • Loading branch information
squeek502 committed Dec 30, 2014
1 parent c46e6e0 commit 0d388be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/items/tools/PotionLauncher.java
Expand Up @@ -86,7 +86,7 @@ public int getMaxItemUseDuration (ItemStack stack)
@Override
public EnumAction getItemUseAction (ItemStack stack)
{
if (!stack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Loaded"))
if (stack != null && stack.hasTagCompound() && !stack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Loaded"))
return EnumAction.bow;
else
return EnumAction.none;
Expand Down

0 comments on commit 0d388be

Please sign in to comment.