From d07b7bd5a2be2c19ca0db24cdf2a63f00b54db91 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 18 Feb 2024 14:39:18 +0000 Subject: [PATCH] Fix crash when discarding a spell --- .../unicopia/ability/magic/spell/PlaceableSpell.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/PlaceableSpell.java b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/PlaceableSpell.java index 9a135942..51c26ea8 100644 --- a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/PlaceableSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/PlaceableSpell.java @@ -103,7 +103,8 @@ public class PlaceableSpell extends AbstractDelegatingSpell implements OrientedS @Override public Collection getDelegates() { - return List.of(spell.get()); + Spell spell = this.spell.get(); + return spell == null ? List.of() : List.of(spell); } @Override