Hopefully fix crash when attempting to throwAll items in strange situations where source slot cannot be ascertained

This commit is contained in:
Chicken-Bones committed 2014-08-19 10:43:01 +10:00
1 parent 0995fbfbdd
commit 8d491fb34f
1 file changed
+5 -1
+5 -1
View File
@@ -324,7 +324,11 @@ public class FastTransferManager
clickSlot(window, -999);
generateSlotMap(window.inventorySlots, held);
for (int slotIndex : slotZones.get(slotZoneMap.get(pickedUpFromSlot))) {
Integer zone = slotZoneMap.get(pickedUpFromSlot);
if(zone == null) //something went wrong and we can't work out where the item was picked up from
return;
for (int slotIndex : slotZones.get(zone)) {
Slot slot = window.inventorySlots.getSlot(slotIndex);
if (areStacksSameType(held, slot.getStack())) {
clickSlot(window, slotIndex);