Skip to content

Commit

Permalink
Fix crash-issue when network inventory with non-EMI-compatible stacks…
Browse files Browse the repository at this point in the history
… is exposed to EMI (#8294)

Fixes #8290
  • Loading branch information
shartte authored Dec 19, 2024
1 parent b0b13d1 commit 35cc2dc
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ public EmiPlayerInventory getInventory(AbstractContainerScreen<T> screen) {
if (entry.getStoredAmount() <= 0) {
continue; // Skip items that are only craftable
}
list.add(EmiStackHelper.toEmiStack(new GenericStack(entry.getWhat(), entry.getStoredAmount())));
var emiStack = EmiStackHelper
.toEmiStack(new GenericStack(entry.getWhat(), entry.getStoredAmount()));
if (emiStack != null) {
list.add(emiStack);
}
}
}
}
Expand Down

0 comments on commit 35cc2dc

Please sign in to comment.