v3.3.2: Added a safety check to random talent window
This commit is contained in:
@@ -194,6 +194,10 @@ public class TalentsPane extends ScrollPane {
|
|||||||
@Override
|
@Override
|
||||||
protected void onSelect(int index) {
|
protected void onSelect(int index) {
|
||||||
super.onSelect(index);
|
super.onSelect(index);
|
||||||
|
//safety check to ensure previous UI is still there
|
||||||
|
if (TalentTierPane.this.parent == null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (index == 0 || index == 1){
|
if (index == 0 || index == 1){
|
||||||
while (Dungeon.hero.talentPointsAvailable(tier) > 0){
|
while (Dungeon.hero.talentPointsAvailable(tier) > 0){
|
||||||
TalentButton button = Random.element(buttons);
|
TalentButton button = Random.element(buttons);
|
||||||
|
|||||||
Reference in New Issue
Block a user