From 2c71245388bcb286b1c543d4b02ea7c036155eee Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 10 Nov 2008 10:42:19 +0100 Subject: [PATCH] awful.widget: check for image Signed-off-by: Julien Danjou --- lib/awful/widget.lua.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/awful/widget.lua.in b/lib/awful/widget.lua.in index 51e5ebb47..30ac0161f 100644 --- a/lib/awful/widget.lua.in +++ b/lib/awful/widget.lua.in @@ -357,7 +357,7 @@ end -- @param args Standard widget table arguments, plus image for the image path. -- @return A textbox widget configured as a button. function button(args) - if not args then return end + if not args or not args.image then return end args.type = "textbox" local w = capi.widget(args) local img_release = "" @@ -376,6 +376,7 @@ end function launcher(args) if not args.command and not args.menu then return end local w = button(args) + if not w then return end local b = w:buttons() if args.command then