From cbe48d0892621aaa81196dc1d1993a9b7a7fa5f1 Mon Sep 17 00:00:00 2001 From: kevlahnota Date: Mon, 18 Nov 2024 15:09:10 +0800 Subject: [PATCH] Update VPlayerPanel.java should display error for null icons on VPlayerPanel Infotab. If pointer is still null then the icon seems to be disposed (probably on android) or just deliberately missing. --- .../src/forge/screens/match/views/VPlayerPanel.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/forge-gui-mobile/src/forge/screens/match/views/VPlayerPanel.java b/forge-gui-mobile/src/forge/screens/match/views/VPlayerPanel.java index 108e251af07..c8e8ea99c49 100644 --- a/forge-gui-mobile/src/forge/screens/match/views/VPlayerPanel.java +++ b/forge-gui-mobile/src/forge/screens/match/views/VPlayerPanel.java @@ -615,7 +615,13 @@ public class InfoTab extends FDisplayObject { private final VDisplayArea displayArea; private InfoTab(FSkinImageInterface icon0, VDisplayArea displayArea0) { - icon = icon0; + // missing or invalid player infotab icon probably old theme or custom theme. + if (icon0 == null) { + System.err.println("Missing/Invalid VPlayerPanel icon for: " + displayArea0 + " , defaulting to blank icon. Check your theme/skin layout."); + icon = FSkinImage.BLANK; + } else { + icon = icon0; + } displayArea = displayArea0; }