awful.menu: fix error when using the keyboard to navigate on an empty menu
Signed-off-by: Gregor Best <farhaven@googlemail.com> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
b437db6ab0
commit
e9acefa24e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue