naughty.legacy: Handle broken configs betters.

If a config with naughty.layouts.box crashes at startup and the
fallback config uses naughty.layouts.legaxy, it is possible their
will be some lookup for an object which isn't tracked by the legacy
module.
This commit is contained in:
Emmanuel Lepage Vallee 2021-09-22 13:36:49 -07:00
parent 24fc1043ee
commit b038463e22
1 changed files with 1 additions and 1 deletions

View File

@ -134,7 +134,7 @@ local function get_offset(s, position, idx, width, height)
local find_old_to_replace = function() local find_old_to_replace = function()
for i = 1, idx-1 do for i = 1, idx-1 do
local n = current_notifications[s][position][i] local n = current_notifications[s][position][i]
if n.timeout > 0 then if n and n.timeout > 0 then
return n return n
end end
end end