From b038463e22c2661b54b0ea5e81324b8e2772b013 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Wed, 22 Sep 2021 13:36:49 -0700 Subject: [PATCH] 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. --- lib/naughty/layout/legacy.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/naughty/layout/legacy.lua b/lib/naughty/layout/legacy.lua index a1999caa..c5d6c887 100644 --- a/lib/naughty/layout/legacy.lua +++ b/lib/naughty/layout/legacy.lua @@ -134,7 +134,7 @@ local function get_offset(s, position, idx, width, height) local find_old_to_replace = function() for i = 1, idx-1 do local n = current_notifications[s][position][i] - if n.timeout > 0 then + if n and n.timeout > 0 then return n end end