Crash when setting round robin mode with no outputs.

This commit is contained in:
CrazyPants committed 2014-06-08 13:38:20 +08:00
1 parent bc55ccc40a
commit f2bb68ae3f
1 file changed
+4 -1
@@ -369,11 +369,14 @@ public class NetworkedInventory {
@Override
public boolean hasNext() {
return currentCount <= sendPriority.size();
return !sendPriority.isEmpty() && currentCount <= sendPriority.size();
}
@Override
public Target next() {
if(sendPriority.isEmpty()) {
return null;
}
currentCount++;
index++;
if(index >= sendPriority.size()) {