Permalink
Browse files

Check that an invalid item isn't null.

  • Loading branch information...
me4502 committed May 6, 2017
1 parent b21fb60 commit 87696bb219aafbbda8b3e8fe286d90aa7fa3a612
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/main/java/com/sk89q/craftbook/mechanics/crafting/CustomCrafting.java
@@ -143,7 +143,10 @@ public void prepareCraft(PrepareItemCraftEvent event) {
for(ItemStack it : tests) {
if(!ItemUtil.isStackValid(it)) {
- CraftBookPlugin.logDebugMessage("Invalid item in recipe: " + com.google.common.base.Objects.toStringHelper(it).toString(), "advanced-data");
+ if (it != null) {
+ CraftBookPlugin.logDebugMessage("Invalid item in recipe: " +
+ com.google.common.base.Objects.toStringHelper(it).toString(), "advanced-data");
+ }
continue;
}
for(CraftingItemStack cit : tests2) {

0 comments on commit 87696bb

Please sign in to comment.