Fixed some possible null pointer exceptions.

This commit is contained in:
LevelX2 2016-10-03 22:07:10 +02:00
parent 01ca3689b3
commit e8ab8558d1
2 changed files with 2 additions and 2 deletions

View file

@ -125,7 +125,7 @@ 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
this.topCard = (player.isTopCardRevealed() && player.getLibrary().size() > 0)
? new CardView(player.getLibrary().getFromTop(game)) : null;
if (player.getUserData() != null) {
this.userData = player.getUserData();