Fix another null check crash (#1091)

This commit is contained in:
Nicholas Ignoffo 2017-03-11 15:53:43 -08:00
parent 7c8e9b6d8d
commit c4f04b1589
2 changed files with 3 additions and 3 deletions

View file

@ -135,8 +135,8 @@ public class PlayerDemonWillHandler
*/
public static ItemStack addDemonWill(EntityPlayer player, ItemStack willStack)
{
if (willStack == null)
return null;
if (willStack.isEmpty())
return ItemStack.EMPTY;
NonNullList<ItemStack> inventory = player.inventory.mainInventory;

View file

@ -109,7 +109,7 @@ public class WillHandler
{
remainder = PlayerDemonWillHandler.addDemonWill(player, willStack);
if (remainder != null)
if (!remainder.isEmpty())
{
EnumDemonWillType pickupType = ((IDemonWill) remainder.getItem()).getType(remainder);
if (((IDemonWill) remainder.getItem()).getWill(pickupType, remainder) >= 0.0001)