From 19f1edd311b84f4bbcbbe516a2b6cfbe3696686e Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 5 Dec 2020 19:46:13 -0500 Subject: [PATCH] v0.9.1: fixed rare crashes caused by cursed wand effects --- .../shatteredpixel/shatteredpixeldungeon/items/wands/Wand.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/Wand.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/Wand.java index d51d0dfa6..4a37ec603 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/Wand.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/Wand.java @@ -359,6 +359,7 @@ public abstract class Wand extends Item { //if the wand is owned by the hero, but not in their inventory, it must be in the staff if (curCharges == 0 + && charger != null && charger.target == Dungeon.hero && !Dungeon.hero.belongings.contains(this) && Dungeon.hero.hasTalent(Talent.BACKUP_BARRIER)){