mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* Fixed that using a previous internal avatar ID did create an exception while playing/watching a game.
This commit is contained in:
parent
0b23559949
commit
23cd772fea
1 changed files with 3 additions and 1 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue