From c49ad0fa12f4039ff6f1e23369d41af0666cc4f0 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 12 Oct 2023 14:43:37 -0400 Subject: [PATCH] v2.2.0: added a check if the game closed while selecting smith rewards --- .../shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java index 51911ad31..2ef45ce9f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java @@ -207,7 +207,12 @@ public class Blacksmith extends NPC { Game.runOnRenderThread(new Callback() { @Override public void call() { - GameScene.show( new WndBlacksmith( Blacksmith.this, Dungeon.hero ) ); + //in case game was closed during smith reward selection + if (Quest.smithRewards != null && Quest.smiths > 0){ + GameScene.show( new WndBlacksmith.WndSmith( Blacksmith.this, Dungeon.hero ) ); + } else { + GameScene.show(new WndBlacksmith(Blacksmith.this, Dungeon.hero)); + } } });