Fixed a NPE of Meld effect.

This commit is contained in:
LevelX2 2017-01-10 23:54:42 +01:00
parent d55dd515f3
commit a2b8891188

View file

@ -98,7 +98,7 @@ public class MeldEffect extends OneShotEffect {
// Create the meld card and move it to the battlefield. // Create the meld card and move it to the battlefield.
Card sourceCard = game.getExile().getCard(sourceId, game); Card sourceCard = game.getExile().getCard(sourceId, game);
Card meldWithCard = game.getExile().getCard(meldWithId, game); Card meldWithCard = game.getExile().getCard(meldWithId, game);
if (!sourceCard.isCopy() && !meldWithCard.isCopy()) { if (sourceCard != null && !sourceCard.isCopy() && meldWithCard != null && !meldWithCard.isCopy()) {
meldCard.setOwnerId(controller.getId()); meldCard.setOwnerId(controller.getId());
meldCard.setTopHalfCard(meldWithCard, game); meldCard.setTopHalfCard(meldWithCard, game);
meldCard.setBottomHalfCard(sourceCard, game); meldCard.setBottomHalfCard(sourceCard, game);