Fix a possible crash when minecraft derps its item-in-use for players

This commit is contained in:
Bernhard Bonigl committed 2015-02-22 00:25:36 +01:00
1 parent d1f86adb58
commit 59553174f6
1 file changed
+1 -1
@@ -92,7 +92,7 @@ public abstract class ProjectileWeapon extends ToolCore implements IAccuracy, IW
/* Windup */
public int getWindupTime(ItemStack itemStack) {
if(!itemStack.hasTagCompound())
if(itemStack == null || !itemStack.hasTagCompound())
return 1;
NBTTagCompound toolTag = itemStack.getTagCompound().getCompoundTag("InfiTool");