From 745ef0841f6392f15efdd49a0e0f3b886b43e276 Mon Sep 17 00:00:00 2001 From: Caedis Date: Fri, 29 Dec 2023 04:48:19 -0600 Subject: [PATCH] Add null check to level terminal middle click (#186) --- .../java/com/glodblock/github/client/gui/GuiLevelTerminal.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/glodblock/github/client/gui/GuiLevelTerminal.java b/src/main/java/com/glodblock/github/client/gui/GuiLevelTerminal.java index 6f34df8c..0cccefc9 100644 --- a/src/main/java/com/glodblock/github/client/gui/GuiLevelTerminal.java +++ b/src/main/java/com/glodblock/github/client/gui/GuiLevelTerminal.java @@ -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);