mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
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:
parent
6e2441cc42
commit
0b2e61081a
2 changed files with 2 additions and 2 deletions
|
@ -2422,7 +2422,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAME_ALLOW_REQUEST_SHOW_HAND_CARDS, "true").equals("true"),
|
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAME_ALLOW_REQUEST_SHOW_HAND_CARDS, "true").equals("true"),
|
||||||
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAME_CONFIRM_EMPTY_MANA_POOL, "true").equals("true"),
|
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAME_CONFIRM_EMPTY_MANA_POOL, "true").equals("true"),
|
||||||
getUserSkipPrioritySteps(),
|
getUserSkipPrioritySteps(),
|
||||||
MageFrame.getPreferences().get(KEY_CONNECT_FLAG, "world.png"),
|
MageFrame.getPreferences().get(KEY_CONNECT_FLAG, "world"),
|
||||||
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAME_ASK_MOVE_TO_GRAVE_ORDER, "true").equals("true")
|
PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GAME_ASK_MOVE_TO_GRAVE_ORDER, "true").equals("true")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class CountryCellRenderer extends DefaultTableCellRenderer {
|
||||||
private ImageIcon getCountryFlagIcon(String countryCode) {
|
private ImageIcon getCountryFlagIcon(String countryCode) {
|
||||||
ImageIcon flagIcon = flagIconCache.get(countryCode);
|
ImageIcon flagIcon = flagIconCache.get(countryCode);
|
||||||
if (flagIcon == null) {
|
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) {
|
if (flagIcon.getImage() == null) {
|
||||||
logger.warn("Country flag resource not found: " + countryCode);
|
logger.warn("Country flag resource not found: " + countryCode);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue