Merge pull request #912 from Elv13/fix_tag_delete_race
tag: Avoid a race condition when deleting tags.
This commit is contained in:
commit
3fd292e1ff
|
@ -295,7 +295,6 @@ function tag.object.delete(self, fallback_tag, force)
|
|||
|
||||
-- delete the tag
|
||||
data.tags[self].screen = nil
|
||||
data.tags[self] = nil
|
||||
self.activated = false
|
||||
|
||||
-- Update all indexes
|
||||
|
@ -1387,7 +1386,10 @@ capi.screen.connect_signal("removed", function(s)
|
|||
-- If any tag survived until now, forcefully get rid of it
|
||||
for _, t in pairs(s.tags) do
|
||||
t.activated = false
|
||||
data.tags[t] = nil
|
||||
|
||||
if data.tags[t] then
|
||||
data.tags[t].screen = nil
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
Loading…
Reference in New Issue