Skip to content

Commit

Permalink
Fix NPE in ACT
Browse files Browse the repository at this point in the history
Closes #1270
  • Loading branch information
CovertJaguar committed Oct 11, 2013
1 parent 54b2e5d commit 9cb53f9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions common/buildcraft/silicon/TileAdvancedCraftingTable.java
Expand Up @@ -72,7 +72,6 @@ public ItemStack getStackInSlot(int slot) {
if (useRecipeStack || tempStacks == null) {
return craftingSlots.getStackInSlot(slot);
} else {

if (bindings[slot] >= 0) {
return tempStacks[bindings[slot]];
}
Expand All @@ -85,14 +84,14 @@ public ItemStack getStackInSlot(int slot) {

@Override
public void setInventorySlotContents(int slot, ItemStack par2ItemStack) {
if (tempStacks != null && slot >= 0 && slot < 9) {
if (tempStacks != null && slot >= 0 && slot < 9 && bindings[slot] >= 0) {
tempStacks[bindings[slot]] = par2ItemStack;
}
}

@Override
public ItemStack decrStackSize(int slot, int amount) {
if (tempStacks != null && slot >= 0 && slot < 9) {
if (tempStacks != null && slot >= 0 && slot < 9 && bindings[slot] >= 0) {
if (tempStacks[bindings[slot]].stackSize <= amount) {
ItemStack result = tempStacks[bindings[slot]];
tempStacks[bindings[slot]] = null;
Expand Down

0 comments on commit 9cb53f9

Please sign in to comment.