mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
* Fixed that a delayed sacrifice source effect could create a null pointer exception.
This commit is contained in:
parent
77b32014f6
commit
20138891fe
3 changed files with 56 additions and 1 deletions
|
|
@ -62,7 +62,7 @@ public class SacrificeSourceEffect extends OneShotEffect {
|
|||
// Check if the effect was installed by the spell the source was cast by (e.g. Necromancy), if not don't sacrifice the permanent
|
||||
if (source.getSourceObject(game) instanceof Spell) {
|
||||
sourceObject = game.getPermanent(source.getSourceId());
|
||||
if (sourceObject.getZoneChangeCounter(game) > source.getSourceObjectZoneChangeCounter() + 1) {
|
||||
if (sourceObject != null && sourceObject.getZoneChangeCounter(game) > source.getSourceObjectZoneChangeCounter() + 1) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue