awful.tag: handle invalid client in delayed_call (#1372)

A short-lived client (e.g. `urxvt -e false`) might be invalid already
when the delayed callback is called.
This commit is contained in:
Daniel Hahler 2017-01-23 22:53:01 +01:00 committed by GitHub
parent f9975f763c
commit 90bbcf1903
1 changed files with 3 additions and 0 deletions

View File

@ -1387,6 +1387,9 @@ capi.client.connect_signal("property::screen", function(c)
-- awful.rules. It is also messing up the tags before the user have a chance -- awful.rules. It is also messing up the tags before the user have a chance
-- to set them manually. -- to set them manually.
timer.delayed_call(function() timer.delayed_call(function()
if not c.valid then
return
end
local tags, new_tags = c:tags(), {} local tags, new_tags = c:tags(), {}
for _, t in ipairs(tags) do for _, t in ipairs(tags) do