Skip to content

Commit

Permalink
Add better null check for Recipe Category Crafting Item registration
Browse files Browse the repository at this point in the history
  • Loading branch information
mezz committed Sep 11, 2016
1 parent 72003ff commit 79e9b20
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/mezz/jei/util/ModRegistry.java
Expand Up @@ -83,6 +83,12 @@ public void addRecipeCategoryCraftingItem(@Nullable ItemStack craftingItem, @Non
return;
}

if (craftingItem.getItem() == null) {
NullPointerException e = new NullPointerException();
Log.error("Tried to add a RecipeCategoryCraftingItem with null item in the craftingItem.", e);
return;
}

for (String recipeCategoryUid : recipeCategoryUids) {
if (recipeCategoryUid == null) {
IllegalArgumentException e = new IllegalArgumentException();
Expand Down

0 comments on commit 79e9b20

Please sign in to comment.