From 733d16cf3512ebeaf4601c09fb46f23c53d174dc Mon Sep 17 00:00:00 2001 From: GJ Date: Mon, 3 Mar 2014 08:03:13 -0500 Subject: [PATCH] Don't clone if it's null. Fixes #1894 --- .../com/gmail/nossr50/skills/alchemy/AlchemyPotionBrewer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyPotionBrewer.java b/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyPotionBrewer.java index 0dbfd9ac4..4469541f1 100644 --- a/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyPotionBrewer.java +++ b/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyPotionBrewer.java @@ -54,7 +54,7 @@ public final class AlchemyPotionBrewer { } private static boolean removeIngredient(BrewerInventory inventory, Player player) { - ItemStack ingredient = inventory.getIngredient().clone(); + ItemStack ingredient = inventory.getIngredient() == null ? null : inventory.getIngredient().clone(); if (isEmpty(ingredient) || !isValidIngredient(player, ingredient)) { return false;