mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
prevent NPE on old skin/theme
This commit is contained in:
@@ -760,7 +760,13 @@ public class FSkin {
|
||||
public static SkinIcon getIcon(final FSkinProp s0) {
|
||||
final SkinIcon icon = SkinIcon.icons.get(s0);
|
||||
if (icon == null) {
|
||||
final SkinIcon blank = SkinIcon.icons.get(FSkinProp.ICO_BLANK);
|
||||
if (blank == null) // if blank is null at this point then the skin is bugged or GC?
|
||||
throw new NullPointerException("Can't find an icon for FSkinProp " + s0);
|
||||
else { // this should be 2 or less unless a new required image icon is needed.
|
||||
System.err.println("Missing image icon for FSkinProp " + s0 + ". Blank image will be used instead.");
|
||||
return blank;
|
||||
}
|
||||
}
|
||||
return icon;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user