forked from External/mage
* Fixed some possible null pointer exceptions and some minor editing.
This commit is contained in:
parent
69b27f594a
commit
da9e9a1180
4 changed files with 49 additions and 8 deletions
|
|
@ -126,8 +126,9 @@ public class PlayerView implements Serializable {
|
|||
} catch (ConcurrentModificationException e) {
|
||||
// can happen as a player left battlefield while PlayerView is created
|
||||
}
|
||||
this.topCard = (player.isTopCardRevealed() && player.getLibrary().size() > 0)
|
||||
? new CardView(player.getLibrary().getFromTop(game)) : null;
|
||||
Card cardOnTop = (player.isTopCardRevealed() && player.getLibrary().size() > 0)
|
||||
? player.getLibrary().getFromTop(game) : null;
|
||||
this.topCard = cardOnTop != null ? new CardView(cardOnTop) : null;
|
||||
if (player.getUserData() != null) {
|
||||
this.userData = player.getUserData();
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue