From b36d32f11a21cabcc8fbbd145fb8a1560c406799 Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Thu, 6 Nov 2014 16:39:06 +0100 Subject: [PATCH] fix #2171 --- common/buildcraft/core/inventory/InventoryIteratorSided.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/buildcraft/core/inventory/InventoryIteratorSided.java b/common/buildcraft/core/inventory/InventoryIteratorSided.java index 5b0c3eda..9b9ac881 100644 --- a/common/buildcraft/core/inventory/InventoryIteratorSided.java +++ b/common/buildcraft/core/inventory/InventoryIteratorSided.java @@ -35,12 +35,12 @@ class InventoryIteratorSided implements Iterable { @Override public boolean hasNext() { - return index < slots.length; + return slots != null ? index < slots.length : false; } @Override public IInvSlot next() { - return new InvSlot(slots[index++]); + return slots != null ? new InvSlot(slots[index++]) : null; } @Override