v0.9.0: added a safety check to talent buttons
This commit is contained in:
parent
fb8d469b35
commit
9e2ea051ee
|
@ -139,7 +139,7 @@ public class TalentButton extends Button {
|
|||
}
|
||||
|
||||
public void upgradeTalent(){
|
||||
if (Dungeon.hero.talentPointsAvailable() > 0) {
|
||||
if (Dungeon.hero.talentPointsAvailable() > 0 && parent != null) {
|
||||
Dungeon.hero.upgradeTalent(talent);
|
||||
float oldWidth = fill.width();
|
||||
pointsInTalent++;
|
||||
|
|
Loading…
Reference in New Issue
Block a user