v2.3.1: added a safety check to WndWandmaker
This commit is contained in:
+2
-2
@@ -77,7 +77,7 @@ public class WndWandmaker extends Window {
|
|||||||
ItemButton btnWand1 = new ItemButton(){
|
ItemButton btnWand1 = new ItemButton(){
|
||||||
@Override
|
@Override
|
||||||
protected void onClick() {
|
protected void onClick() {
|
||||||
if (Dungeon.hero.belongings.contains(questItem)) {
|
if (Dungeon.hero.belongings.contains(questItem) && item() != null) {
|
||||||
GameScene.show(new RewardWindow(item()));
|
GameScene.show(new RewardWindow(item()));
|
||||||
} else {
|
} else {
|
||||||
hide();
|
hide();
|
||||||
@@ -91,7 +91,7 @@ public class WndWandmaker extends Window {
|
|||||||
ItemButton btnWand2 = new ItemButton(){
|
ItemButton btnWand2 = new ItemButton(){
|
||||||
@Override
|
@Override
|
||||||
protected void onClick() {
|
protected void onClick() {
|
||||||
if (Dungeon.hero.belongings.contains(questItem)) {
|
if (Dungeon.hero.belongings.contains(questItem) && item() != null) {
|
||||||
GameScene.show(new RewardWindow(item()));
|
GameScene.show(new RewardWindow(item()));
|
||||||
} else {
|
} else {
|
||||||
hide();
|
hide();
|
||||||
|
|||||||
Reference in New Issue
Block a user