Fix crash in tempShowCard

Fix crash that can occur from calling canPlay too early
This commit is contained in:
drdev
2014-10-06 05:20:48 +00:00
parent 6eef6ab9ad
commit 2cedade957
3 changed files with 4 additions and 6 deletions

View File

@@ -164,7 +164,9 @@ public class PlayerControllerHuman extends PlayerController {
}
}
private void tempShowCard(Card c) {
CardView cv = MatchUtil.cards.get(c.getId());
if (c == null) { return; }
CardView cv = gameView.getCardView(c, false);
if (!cv.mayBeShown()) {
cv.setMayBeShown(true);
tempShownCards.add(c);