Add null check to level terminal middle click (#186)

This commit is contained in:
Caedis authored and GitHub committed 2023-12-29 11:48:19 +01:00
1 parent 7dedef21fe
commit 745ef0841f
1 file changed
+2 -1
@@ -1386,7 +1386,8 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
if (action != null) {
ItemStack itemStack = getInventory().getStackInSlot(slotIdx);
if (itemStack.hasTagCompound() && itemStack.getTagCompound().hasKey(TLMTags.Stack.tagName)) {
if (itemStack != null && itemStack.hasTagCompound()
&& itemStack.getTagCompound().hasKey(TLMTags.Stack.tagName)) {
long batch = itemStack.getTagCompound().getLong(TLMTags.Batch.tagName);
NBTTagCompound stackData = itemStack.getTagCompound().getCompoundTag(TLMTags.Stack.tagName);
ItemStack is = ItemStack.loadItemStackFromNBT(stackData);