add null check

This commit is contained in:
Ingmar Goudt 2019-01-11 01:04:34 +01:00
parent d7e68cf932
commit d5003a6f8f
2 changed files with 2 additions and 2 deletions

View file

@ -115,7 +115,7 @@ class CipherStoreEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Card cipherCard = game.getCard(cipherCardId);
if (cipherCard != null) {
if (cipherCard != null && controller != null) {
Card copyCard = game.copyCard(cipherCard, source, controller.getId());
SpellAbility ability = copyCard.getSpellAbility();
// remove the cipher effect from the copy