Skip to content

Commit

Permalink
Fix crash when deleting the current skill set (PathOfBuildingCommunit…
Browse files Browse the repository at this point in the history
…y#4772)

When removing it from table this causes crash when rebuilding skill set
dropdown.

Closes PathOfBuildingCommunity#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>
  • Loading branch information
deathbeam and Tomas Slusny committed Aug 14, 2022
1 parent f8298d7 commit 9eddc38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Classes/SkillSetListControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function SkillSetListClass:OnSelDelete(index, skillSetId)
if #self.list > 1 then
main:OpenConfirmPopup("Delete Item Set", "Are you sure you want to delete '"..(skillSet.title or "Default").."'?", "Delete", function()
t_remove(self.list, index)
t_remove(self.skillsTab.skillSets, skillSetId)
self.skillsTab.skillSets[skillSetId] = nil
self.selIndex = nil
self.selValue = nil
if skillSetId == self.skillsTab.activeSkillSetId then
Expand All @@ -115,4 +115,4 @@ function SkillSetListClass:OnSelKeyDown(index, skillSetId, key)
if key == "F2" then
self:RenameSet(skillSetId)
end
end
end

0 comments on commit 9eddc38

Please sign in to comment.