v2.3.1: added a safety check to WndWandmaker

This commit is contained in:
Evan Debenham
2024-01-21 14:45:26 -05:00
parent 0ed96a3c18
commit be38997c31

View File

@@ -77,7 +77,7 @@ public class WndWandmaker extends Window {
ItemButton btnWand1 = new ItemButton(){
@Override
protected void onClick() {
if (Dungeon.hero.belongings.contains(questItem)) {
if (Dungeon.hero.belongings.contains(questItem) && item() != null) {
GameScene.show(new RewardWindow(item()));
} else {
hide();
@@ -91,7 +91,7 @@ public class WndWandmaker extends Window {
ItemButton btnWand2 = new ItemButton(){
@Override
protected void onClick() {
if (Dungeon.hero.belongings.contains(questItem)) {
if (Dungeon.hero.belongings.contains(questItem) && item() != null) {
GameScene.show(new RewardWindow(item()));
} else {
hide();