fix #2171
This commit is contained in:
parent
2507218e00
commit
b36d32f11a
1 changed files with 2 additions and 2 deletions
|
@ -35,12 +35,12 @@ class InventoryIteratorSided implements Iterable<IInvSlot> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasNext() {
|
public boolean hasNext() {
|
||||||
return index < slots.length;
|
return slots != null ? index < slots.length : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IInvSlot next() {
|
public IInvSlot next() {
|
||||||
return new InvSlot(slots[index++]);
|
return slots != null ? new InvSlot(slots[index++]) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue