Fix unsafe getCompoundTag call in PotionLauncher.getItemUseAction

* See squeek502/AppleCore#9
This commit is contained in:
Ryan Liptak committed 2014-12-29 22:10:09 -08:00
1 parent c46e6e0bc2
commit 0d388bef52
1 file changed
+1 -1
@@ -86,7 +86,7 @@ public class PotionLauncher extends Item
@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;