From e9acefa24e4f358269e44ffceb5f06707c7191f3 Mon Sep 17 00:00:00 2001 From: Gregor Best Date: Mon, 30 Mar 2009 23:45:29 +0200 Subject: [PATCH] awful.menu: fix error when using the keyboard to navigate on an empty menu Signed-off-by: Gregor Best Signed-off-by: Julien Danjou --- lib/awful/menu.lua.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/awful/menu.lua.in b/lib/awful/menu.lua.in index 959dc4711..6a0c7e6b0 100644 --- a/lib/awful/menu.lua.in +++ b/lib/awful/menu.lua.in @@ -97,6 +97,9 @@ end local function exec(menu, num, mouse_event) cmd = menu.items[num].cmd if type(cmd) == "table" then + if #cmd == 0 then + return + end if not menu.child[num] then menu.child[num] = new({ items = cmd }, menu, num) end