Use getSourceObjectIfItStillExists.

This commit is contained in:
dilnu 2020-02-09 13:40:26 -05:00
parent 847df3eeb8
commit a089b70d64
2 changed files with 18 additions and 19 deletions

View file

@ -34,7 +34,7 @@ public class RevealAndShuffleIntoLibrarySourceEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
MageObject sourceObject = game.getObject(source.getSourceId());
MageObject sourceObject = source.getSourceObjectIfItStillExists(game);
Player controller = game.getPlayer(source.getControllerId());
if (sourceObject != null && controller != null) {
Player owner = null;