Skip to content

Commit 9eddc38

Browse files
deathbeamTomas Slusny
andauthored
Fix crash when deleting the current skill set (#4772)
When removing it from table this causes crash when rebuilding skill set dropdown. Closes #4771 Signed-off-by: Tomas Slusny <ts6234@intl.att.com> Signed-off-by: Tomas Slusny <ts6234@intl.att.com> Co-authored-by: Tomas Slusny <ts6234@intl.att.com>
1 parent f8298d7 commit 9eddc38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Classes/SkillSetListControl.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function SkillSetListClass:OnSelDelete(index, skillSetId)
100100
if #self.list > 1 then
101101
main:OpenConfirmPopup("Delete Item Set", "Are you sure you want to delete '"..(skillSet.title or "Default").."'?", "Delete", function()
102102
t_remove(self.list, index)
103-
t_remove(self.skillsTab.skillSets, skillSetId)
103+
self.skillsTab.skillSets[skillSetId] = nil
104104
self.selIndex = nil
105105
self.selValue = nil
106106
if skillSetId == self.skillsTab.activeSkillSetId then
@@ -115,4 +115,4 @@ function SkillSetListClass:OnSelKeyDown(index, skillSetId, key)
115115
if key == "F2" then
116116
self:RenameSet(skillSetId)
117117
end
118-
end
118+
end

0 commit comments

Comments
 (0)