mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-19 11:59:19 +00:00
Add nullCheck for 'protoStack[0]' to prevent crash when there is a removal of an item from the modpack. (#28)
This commit is contained in:
1 parent
87d5f7673a
commit
ae9cb8ccf5
1 file changed
+1
-1
+1
-1
@@ -566,7 +566,7 @@ public class TileEntityDrawersComp extends TileEntityDrawers {
|
||||
|
||||
@Override
|
||||
public int getMaxCapacity(int slot) {
|
||||
if (protoStack[slot] == null || convRate == null || convRate[slot] == 0) return 0;
|
||||
if (protoStack[slot] == null || protoStack[0] == null || convRate == null || convRate[slot] == 0) return 0;
|
||||
|
||||
if (TileEntityDrawersComp.this.isUnlimited() || TileEntityDrawersComp.this.isVending()) {
|
||||
if (convRate == null || protoStack[slot] == null || convRate[slot] == 0) return Integer.MAX_VALUE;
|
||||
|
||||
Reference in new issue
Block a user