prevent NPE, update The Clone Saga trigger

This commit is contained in:
Anthony Calosa
2025-09-04 12:58:11 +08:00
parent 80475c6b62
commit ff8fd51bf1
2 changed files with 3 additions and 1 deletions

View File

@@ -455,6 +455,8 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
ColumnDef groupPileBy = groupBy == null ? pileBy : groupBy.getGroupPileBy(i, pileBy);
Map<Comparable<?>, Pile> piles = new TreeMap<>();
for (ItemInfo itemInfo : group.items) {
if (itemInfo == null)
continue;
Comparable<?> key = groupPileBy.fnSort.apply(itemInfo);
if (key != null && !piles.containsKey(key)) {
piles.put(key, new Pile());