awful.menu: check there's at least one item
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
d6dbb00f10
commit
ee1e63009b
|
@ -231,7 +231,7 @@ end
|
||||||
--- Toggle menu visibility.
|
--- Toggle menu visibility.
|
||||||
-- @param menu The menu to show if it's hidden, or to hide if it's shown.
|
-- @param menu The menu to show if it's hidden, or to hide if it's shown.
|
||||||
function toggle(menu)
|
function toggle(menu)
|
||||||
if menu.items[1].screen then
|
if menu.items[1] and menu.items[1].screen then
|
||||||
hide(menu)
|
hide(menu)
|
||||||
else
|
else
|
||||||
show(menu)
|
show(menu)
|
||||||
|
|
Loading…
Reference in New Issue