Fixed a problem with the country flag resource name causing null pointer exceptions and graphical problems on the client side.

This commit is contained in:
LevelX2 2015-06-14 14:53:23 +02:00
parent 6e2441cc42
commit 0b2e61081a
2 changed files with 2 additions and 2 deletions

View file

@ -68,7 +68,7 @@ public class CountryCellRenderer extends DefaultTableCellRenderer {
private ImageIcon getCountryFlagIcon(String countryCode) {
ImageIcon flagIcon = flagIconCache.get(countryCode);
if (flagIcon == null) {
flagIcon = new javax.swing.ImageIcon(getClass().getResource("/flags/" + countryCode +".png"));
flagIcon = new javax.swing.ImageIcon(getClass().getResource("/flags/" + countryCode + (countryCode.endsWith(".png") ? "" :".png")));
if (flagIcon.getImage() == null) {
logger.warn("Country flag resource not found: " + countryCode);
} else {