mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Fixed some possible null pointer exceptions.
This commit is contained in:
parent
01ca3689b3
commit
e8ab8558d1
2 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
|
|
|
@ -146,7 +146,7 @@ public class DynamicManaEffect extends BasicManaEffect {
|
|||
} else {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
ChoiceColor choiceColor = new ChoiceColor();
|
||||
ChoiceColor choiceColor = new ChoiceColor(true);
|
||||
for (int i = 0; i < count; i++) {
|
||||
if (!choiceColor.isChosen()) {
|
||||
while (!controller.choose(Outcome.Benefit, choiceColor, game)) {
|
||||
|
|
Loading…
Reference in a new issue