From ee1e63009b6b3f64ab478a74713c9a48f45e5bd8 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 29 Dec 2008 17:20:33 +0100 Subject: [PATCH] awful.menu: check there's at least one item Signed-off-by: Julien Danjou --- lib/awful/menu.lua.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/awful/menu.lua.in b/lib/awful/menu.lua.in index b657d19f..158c92ea 100644 --- a/lib/awful/menu.lua.in +++ b/lib/awful/menu.lua.in @@ -231,7 +231,7 @@ end --- Toggle menu visibility. -- @param menu The menu to show if it's hidden, or to hide if it's shown. function toggle(menu) - if menu.items[1].screen then + if menu.items[1] and menu.items[1].screen then hide(menu) else show(menu)