diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SnipersMark.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SnipersMark.java index b56e41532..8455e1a7d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SnipersMark.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SnipersMark.java @@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; @@ -88,7 +89,10 @@ public class SnipersMark extends FlavourBuff implements ActionIndicator.Action { @Override public void doAction() { - SpiritBow bow = Dungeon.hero.belongings.getItem(SpiritBow.class); + Hero hero = Dungeon.hero; + if (hero == null) return; + + SpiritBow bow = hero.belongings.getItem(SpiritBow.class); if (bow == null) return; SpiritBow.SpiritArrow arrow = bow.knockArrow(); @@ -99,7 +103,7 @@ public class SnipersMark extends FlavourBuff implements ActionIndicator.Action { bow.sniperSpecial = true; - arrow.cast(Dungeon.hero, QuickSlotButton.autoAim(ch, arrow)); + arrow.cast(hero, QuickSlotButton.autoAim(ch, arrow)); detach(); }