mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
Fixed possible NPE in HumanPlayer.
This commit is contained in:
parent
d48a8b35fd
commit
eafa18a6e8
1 changed files with 2 additions and 4 deletions
|
|
@ -55,14 +55,12 @@ import mage.cards.Cards;
|
||||||
import mage.cards.decks.Deck;
|
import mage.cards.decks.Deck;
|
||||||
import mage.choices.Choice;
|
import mage.choices.Choice;
|
||||||
import mage.choices.ChoiceImpl;
|
import mage.choices.ChoiceImpl;
|
||||||
import mage.constants.AsThoughEffectType;
|
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.RangeOfInfluence;
|
import mage.constants.RangeOfInfluence;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterAttackingCreature;
|
import mage.filter.common.FilterAttackingCreature;
|
||||||
import mage.filter.common.FilterBlockingCreature;
|
import mage.filter.common.FilterBlockingCreature;
|
||||||
import mage.filter.common.FilterCreatureForCombat;
|
import mage.filter.common.FilterCreatureForCombat;
|
||||||
import mage.filter.common.FilterCreatureForCombatBase;
|
|
||||||
import mage.filter.common.FilterCreatureForCombatBlock;
|
import mage.filter.common.FilterCreatureForCombatBlock;
|
||||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
|
@ -521,8 +519,8 @@ public class HumanPlayer extends PlayerImpl<HumanPlayer> {
|
||||||
updateGameStatePriority("announceXMana", game);
|
updateGameStatePriority("announceXMana", game);
|
||||||
game.fireGetAmountEvent(playerId, message, min, max);
|
game.fireGetAmountEvent(playerId, message, min, max);
|
||||||
waitForIntegerResponse(game);
|
waitForIntegerResponse(game);
|
||||||
if (response != null) {
|
if (response != null && response.getInteger() != null) {
|
||||||
xValue = response.getInteger();
|
xValue = response.getInteger().intValue();
|
||||||
}
|
}
|
||||||
return xValue;
|
return xValue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue