v3.3.2: Added a safety check to random talent window

This commit is contained in:
Evan Debenham
2025-12-31 16:07:27 -05:00
parent 4e73f82c46
commit 6b0811f511

View File

@@ -194,6 +194,10 @@ public class TalentsPane extends ScrollPane {
@Override
protected void onSelect(int index) {
super.onSelect(index);
//safety check to ensure previous UI is still there
if (TalentTierPane.this.parent == null){
return;
}
if (index == 0 || index == 1){
while (Dungeon.hero.talentPointsAvailable(tier) > 0){
TalentButton button = Random.element(buttons);