Reveal empty list won't crash the game

This commit is contained in:
Maxmtg
2014-02-02 00:05:41 +00:00
parent d9d32f7508
commit 4c48e3e089

View File

@@ -464,7 +464,11 @@ public class PlayerControllerHuman extends PlayerController {
if (StringUtils.isBlank(message)) { if (StringUtils.isBlank(message)) {
message = "Looking at cards in {player's} " + zone.name(); message = "Looking at cards in {player's} " + zone.name();
} }
GuiChoose.reveal(formatMessage(message, owner), cards); String fm = formatMessage(message, owner);
if ( !cards.isEmpty() )
GuiChoose.reveal(fm, cards);
else
GuiDialog.message("There are no cards in the named location", fm);
} }
@Override @Override