From 7f3ff5f26faa74f721bea0e6bb577ce205a5652b Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Mon, 2 Jan 2017 17:21:10 +0100 Subject: [PATCH] menubar: Fix hide() When hide() was called without any calls to shown() before, an error would occur. Signed-off-by: Uli Schlachter --- lib/menubar/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/menubar/init.lua b/lib/menubar/init.lua index fc9d204c..77eee8c6 100644 --- a/lib/menubar/init.lua +++ b/lib/menubar/init.lua @@ -451,7 +451,9 @@ end --- Hide the menubar. function menubar.hide() - instance.wibox.visible = false + if instance then + instance.wibox.visible = false + end end --- Get a menubar wibox.