panel: Ensure client is valid after delayed call
This commit is contained in:
parent
fad8f6e108
commit
9465aa94af
|
@ -51,7 +51,8 @@ local function spawn(cmd, args)
|
|||
end
|
||||
c:connect_signal("unfocus", function ()
|
||||
gtimer.delayed_call(function ()
|
||||
if c and not (client.focus and client.focus.floating) then
|
||||
local valid = pcall(function () return c.valid end) and c.valid
|
||||
if valid and not (client.focus and client.focus.floating) then
|
||||
panel.toggle_func(c, false)
|
||||
end
|
||||
end)
|
||||
|
|
Loading…
Reference in New Issue