Skip to content

Commit

Permalink
Check for null stacks when scanning with spectator, closes #3512
Browse files Browse the repository at this point in the history
  • Loading branch information
Hubry committed Nov 10, 2020
1 parent bfdebe4 commit d46cb8b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ private boolean scanInventory(IInventory inv, ItemStack pstack) {

for (int l = 0; l < inv.getSizeInventory(); l++) {
ItemStack istack = inv.getStackInSlot(l);
if (!istack.isEmpty() && equalStacks(istack, pstack)) {
// Some mods still set stuff to null apparently...
if (istack != null && !istack.isEmpty() && equalStacks(istack, pstack)) {
return true;
}
}
Expand Down

0 comments on commit d46cb8b

Please sign in to comment.