fix crash when hiding temporarily shown zones

This commit is contained in:
Peter F. Patel-Schneider
2019-02-04 14:24:34 -05:00
parent 43cca9b635
commit efe71e8384

View File

@@ -457,22 +457,24 @@ public final class CMatchUI
@Override @Override
public void hideZones(final PlayerView controller, final Iterable<PlayerZoneUpdate> zonesToUpdate) { public void hideZones(final PlayerView controller, final Iterable<PlayerZoneUpdate> zonesToUpdate) {
for (final PlayerZoneUpdate update : zonesToUpdate) { if ( zonesToUpdate != null ) {
final PlayerView player = update.getPlayer(); for (final PlayerZoneUpdate update : zonesToUpdate) {
for (final ZoneType zone : update.getZones()) { final PlayerView player = update.getPlayer();
switch (zone) { for (final ZoneType zone : update.getZones()) {
case Battlefield: // always shown switch (zone) {
break; case Battlefield: // always shown
case Hand: // the controller's hand should never be temporarily shown, but ... break;
case Library: case Hand: // the controller's hand should never be temporarily shown, but ...
case Graveyard: case Library:
case Exile: case Graveyard:
case Flashback: case Exile:
case Command: case Flashback:
FloatingZone.hide(this,player,zone); case Command:
break; FloatingZone.hide(this,player,zone);
default: break;
break; default:
break;
}
} }
} }
} }