From 6f59c0d2ce4b2162939d334af7c2309828ce4ac1 Mon Sep 17 00:00:00 2001 From: kevlahnota Date: Fri, 22 Nov 2024 05:58:49 +0800 Subject: [PATCH 1/5] prevent NPE --- forge-gui-mobile/src/forge/card/CardZoom.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/forge-gui-mobile/src/forge/card/CardZoom.java b/forge-gui-mobile/src/forge/card/CardZoom.java index 7060e870273..2e9155c8651 100644 --- a/forge-gui-mobile/src/forge/card/CardZoom.java +++ b/forge-gui-mobile/src/forge/card/CardZoom.java @@ -377,9 +377,11 @@ public class CardZoom extends FOverlay { float x = (w - cardWidth) / 2; y = (h - cardHeight) / 2; if (zoomMode) { - CardImageRenderer.drawZoom(g, currentCard, gameView, showBackSide? showBackSide : showAltState, x, y, cardWidth, cardHeight, getWidth(), getHeight(), true); + if (currentCard != null) + CardImageRenderer.drawZoom(g, currentCard, gameView, showBackSide? showBackSide : showAltState, x, y, cardWidth, cardHeight, getWidth(), getHeight(), true); } else { - CardImageRenderer.drawDetails(g, currentCard, gameView, showBackSide ? showBackSide : showAltState, x, y, cardWidth, cardHeight); + if (currentCard != null) + CardImageRenderer.drawDetails(g, currentCard, gameView, showBackSide ? showBackSide : showAltState, x, y, cardWidth, cardHeight); } if (!showMerged) { From 29ce2e01fd9680372078353a20976f86d3519bdc Mon Sep 17 00:00:00 2001 From: kevlahnota Date: Fri, 22 Nov 2024 06:04:25 +0800 Subject: [PATCH 2/5] Update ImageView.java --- .../src/main/java/forge/itemmanager/views/ImageView.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/forge-gui-desktop/src/main/java/forge/itemmanager/views/ImageView.java b/forge-gui-desktop/src/main/java/forge/itemmanager/views/ImageView.java index e01969bbeef..0136367ac69 100644 --- a/forge-gui-desktop/src/main/java/forge/itemmanager/views/ImageView.java +++ b/forge-gui-desktop/src/main/java/forge/itemmanager/views/ImageView.java @@ -591,10 +591,12 @@ public class ImageView extends ItemView { Map, Pile> piles = new TreeMap<>(); for (ItemInfo itemInfo : group.items) { Comparable key = groupPileBy.fnSort.apply(itemInfo); - if (!piles.containsKey(key)) { + if (key != null && !piles.containsKey(key)) { piles.put(key, new Pile()); } - piles.get(key).items.add(itemInfo); + Pile p = key == null ? null : piles.getOrDefault(key, null); + if (p != null) + p.items.add(itemInfo); } group.piles.clear(); group.piles.addAll(piles.values()); From 2bf67e931e897bd780b028b3227f58244ddaf960 Mon Sep 17 00:00:00 2001 From: Chris H Date: Thu, 21 Nov 2024 22:15:51 -0500 Subject: [PATCH 3/5] Update remove-stale-branches.yml --- .github/workflows/remove-stale-branches.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/remove-stale-branches.yml b/.github/workflows/remove-stale-branches.yml index 8f06accdb9d..564c709f28a 100644 --- a/.github/workflows/remove-stale-branches.yml +++ b/.github/workflows/remove-stale-branches.yml @@ -1,4 +1,7 @@ +name: Remove stale branches + on: + workflow_dispatch: schedule: - cron: "0 0 * * *" # Everday at midnight @@ -10,3 +13,4 @@ jobs: - uses: fpicalausa/remove-stale-branches@v1.6.0 with: dry-run: true # Check out the console output before setting this to false + ignore-unknown-authors: true From 4436a83cc558bb83c14d4b39b6ce57aca2aba098 Mon Sep 17 00:00:00 2001 From: Chris H Date: Thu, 21 Nov 2024 22:20:21 -0500 Subject: [PATCH 4/5] Update remove-stale-branches.yml --- .github/workflows/remove-stale-branches.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/remove-stale-branches.yml b/.github/workflows/remove-stale-branches.yml index 564c709f28a..78933088d37 100644 --- a/.github/workflows/remove-stale-branches.yml +++ b/.github/workflows/remove-stale-branches.yml @@ -14,3 +14,4 @@ jobs: with: dry-run: true # Check out the console output before setting this to false ignore-unknown-authors: true + default-recipient: tehdiplomat From 03b87003ef6bf8733f33db368ba1ee1e693af89f Mon Sep 17 00:00:00 2001 From: Chris H Date: Thu, 21 Nov 2024 22:22:32 -0500 Subject: [PATCH 5/5] Update remove-stale-branches.yml --- .github/workflows/remove-stale-branches.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/remove-stale-branches.yml b/.github/workflows/remove-stale-branches.yml index 78933088d37..40a68cf2307 100644 --- a/.github/workflows/remove-stale-branches.yml +++ b/.github/workflows/remove-stale-branches.yml @@ -12,6 +12,6 @@ jobs: steps: - uses: fpicalausa/remove-stale-branches@v1.6.0 with: - dry-run: true # Check out the console output before setting this to false + dry-run: false # Check out the console output before setting this to false ignore-unknown-authors: true default-recipient: tehdiplomat