From 27e41e2e77c8aed287413cc6b1490b666c47321c Mon Sep 17 00:00:00 2001 From: Nicholas Ignoffo Date: Mon, 5 Feb 2018 17:56:06 -0800 Subject: [PATCH] Fix crash when obtaining owner from an unbound bindable item (#1205) --- .../bloodmagic/apibutnotreally/impl/ItemBindable.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/WayofTime/bloodmagic/apibutnotreally/impl/ItemBindable.java b/src/main/java/WayofTime/bloodmagic/apibutnotreally/impl/ItemBindable.java index bb705a2c..2add8510 100644 --- a/src/main/java/WayofTime/bloodmagic/apibutnotreally/impl/ItemBindable.java +++ b/src/main/java/WayofTime/bloodmagic/apibutnotreally/impl/ItemBindable.java @@ -25,11 +25,11 @@ public class ItemBindable extends Item implements IBindable { @Override public String getOwnerName(ItemStack stack) { - return !stack.isEmpty() ? stack.getTagCompound().getString(Constants.NBT.OWNER_NAME) : null; + return !stack.isEmpty() && stack.hasTagCompound() ? stack.getTagCompound().getString(Constants.NBT.OWNER_NAME) : null; } @Override public String getOwnerUUID(ItemStack stack) { - return !stack.isEmpty() ? stack.getTagCompound().getString(Constants.NBT.OWNER_UUID) : null; + return !stack.isEmpty() && stack.hasTagCompound() ? stack.getTagCompound().getString(Constants.NBT.OWNER_UUID) : null; } }