Fixed a potential crash when picking up items.

This commit is contained in:
AlgorithmX2 2014-05-24 18:23:40 -05:00
parent 1b207a17e9
commit aa6d05af2e

View file

@ -809,9 +809,14 @@ public abstract class AEBaseContainer extends Container
long maxSize = ais.getItemStack().getMaxStackSize();
ais.setStackSize( maxSize );
ais = cellInv.extractItems( ais, Actionable.SIMULATE, mySrc );
if ( ais != null )
{
long stackSize = Math.min( maxSize, ais.getStackSize() );
ais.setStackSize( (stackSize + 1) >> 1 );
ais = Platform.poweredExtraction( powerSrc, cellInv, ais, mySrc );
}
if ( ais != null )
player.inventory.setItemStack( ais.getItemStack() );
else