Check if choice.getColor() is null

This commit is contained in:
Noah Gleason 2018-06-19 18:59:16 -04:00
parent 262d048893
commit 4c73c93866
No known key found for this signature in database
GPG key ID: EC030EC6B0650A40

View file

@ -60,7 +60,7 @@ class SearingRaysEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
ChoiceColor choice = new ChoiceColor();
if (controller != null && controller.choose(outcome, choice, game)) {
if (controller != null && controller.choose(outcome, choice, game) && choice.getColor() != null) {
FilterCreaturePermanent filter = new FilterCreaturePermanent(choice.getColor().getDescription()+" creatures");
filter.add(new ColorPredicate(choice.getColor()));
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {