Skip to content

Commit

Permalink
Add null check to level terminal middle click (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
Caedis authored Dec 29, 2023
1 parent 7dedef2 commit 745ef08
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,8 @@ public boolean mouseClicked(int mouseX, int mouseY, int mouseButton) {

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);
Expand Down

0 comments on commit 745ef08

Please sign in to comment.