From 0d388bef5298d4b1817cf8df53dcdc0eeb58ac00 Mon Sep 17 00:00:00 2001 From: Ryan Liptak Date: Mon, 29 Dec 2014 22:10:09 -0800 Subject: [PATCH] Fix unsafe getCompoundTag call in PotionLauncher.getItemUseAction * See squeek502/AppleCore#9 --- src/main/java/tconstruct/items/tools/PotionLauncher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tconstruct/items/tools/PotionLauncher.java b/src/main/java/tconstruct/items/tools/PotionLauncher.java index 34152d00..9e8de293 100644 --- a/src/main/java/tconstruct/items/tools/PotionLauncher.java +++ b/src/main/java/tconstruct/items/tools/PotionLauncher.java @@ -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;