menubar: Fix hide()

When hide() was called without any calls to shown() before, an error
would occur.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2017-01-02 17:21:10 +01:00
parent 68f0883a44
commit 7f3ff5f26f
1 changed files with 3 additions and 1 deletions

View File

@ -451,8 +451,10 @@ end
--- Hide the menubar. --- Hide the menubar.
function menubar.hide() function menubar.hide()
if instance then
instance.wibox.visible = false instance.wibox.visible = false
end end
end
--- Get a menubar wibox. --- Get a menubar wibox.
-- @tparam[opt] screen scr Screen. -- @tparam[opt] screen scr Screen.