Fixes #579 "Server Crash on startup"

This commit is contained in:
Raoul Van den Berge
2016-11-05 14:03:58 +01:00
parent 1d2dcb5d57
commit be2f038c18
2 changed files with 6 additions and 3 deletions

View File

@@ -58,10 +58,12 @@ public abstract class ItemStorageExternal implements IItemStorage {
// In that case, we remove the items that have been removed due to the shrinkage
if (cache.size() > newStacks.size()) {
for (int i = newStacks.size(); i < cache.size(); ++i) {
ItemStack change = ItemHandlerHelper.copyStackWithSize(cache.get(i), -cache.get(i).stackSize);
if (cache.get(i) != null) {
ItemStack change = ItemHandlerHelper.copyStackWithSize(cache.get(i), -cache.get(i).stackSize);
if (change != null) {
changes.add(change);
if (change != null) {
changes.add(change);
}
}
}
}