v0.9.0: added a safety check to talent buttons

This commit is contained in:
Evan Debenham 2020-09-25 15:58:16 -04:00
parent fb8d469b35
commit 9e2ea051ee

View File

@ -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++;