mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
Fix crash when opening up Nursery or Pet tabs of Bazaar
This commit is contained in:
@@ -79,17 +79,11 @@ public class ViewItem extends FPanel {
|
||||
|
||||
SkinImage i;
|
||||
try {
|
||||
final FSkinProp f = FSkinProp.valueOf(FSkinProp.class, bazaarItem.getIcon(qA));
|
||||
i = (SkinImage) GuiBase.getInterface().getSkinIcon(f);
|
||||
} catch (final IllegalArgumentException e) {
|
||||
// Failed to parse FSkinProp
|
||||
try {
|
||||
i = (SkinImage) GuiBase.getInterface().getUnskinnedIcon(bazaarItem.getIcon(qA));
|
||||
} catch (final Exception e1) {
|
||||
// give up, icon unknown
|
||||
e1.printStackTrace();
|
||||
i = (SkinImage) GuiBase.getInterface().getSkinIcon(FSkinProp.ICO_UNKNOWN);
|
||||
}
|
||||
i = (SkinImage) bazaarItem.getIcon(qA);
|
||||
} catch (final Exception e1) {
|
||||
// give up, icon unknown
|
||||
e1.printStackTrace();
|
||||
i = (SkinImage) GuiBase.getInterface().getSkinIcon(FSkinProp.ICO_UNKNOWN);
|
||||
}
|
||||
|
||||
ViewItem.this.lblIcon.setIcon(i);
|
||||
|
||||
Reference in New Issue
Block a user