* Fixed that using a previous internal avatar ID did create an exception while playing/watching a game.

This commit is contained in:
LevelX2 2015-09-27 14:11:56 +02:00
parent 0b23559949
commit 23cd772fea

View file

@ -64,6 +64,8 @@ import mage.client.components.MageRoundPane;
import mage.client.components.ext.dlg.DialogManager; import mage.client.components.ext.dlg.DialogManager;
import mage.client.dialog.PreferencesDialog; import mage.client.dialog.PreferencesDialog;
import static mage.client.dialog.PreferencesDialog.DEFAULT_AVATAR_ID; import static mage.client.dialog.PreferencesDialog.DEFAULT_AVATAR_ID;
import static mage.client.dialog.PreferencesDialog.MAX_AVATAR_ID;
import static mage.client.dialog.PreferencesDialog.MIN_AVATAR_ID;
import mage.client.util.CardsViewUtil; import mage.client.util.CardsViewUtil;
import mage.client.util.Command; import mage.client.util.Command;
import mage.client.util.ImageHelper; import mage.client.util.ImageHelper;
@ -239,7 +241,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
if (!MageFrame.isLite()) { if (!MageFrame.isLite()) {
int id = player.getUserData().getAvatarId(); int id = player.getUserData().getAvatarId();
if (id <= 0) { if (id <= 0 || !(id >= 1000) || (id <= MIN_AVATAR_ID && id > MAX_AVATAR_ID)) {
id = PreferencesDialog.DEFAULT_AVATAR_ID; id = PreferencesDialog.DEFAULT_AVATAR_ID;
} }
if (id != avatarId) { if (id != avatarId) {