X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/6cce5b6fe11fe8c69b08140d645c604fef59e42a..c0deea25035a845907210f2a913099343a16162e:/widgets/contrib/redshift.lua?ds=inline diff --git a/widgets/contrib/redshift.lua b/widgets/contrib/redshift.lua index 8a768fb..fdda61f 100644 --- a/widgets/contrib/redshift.lua +++ b/widgets/contrib/redshift.lua @@ -46,7 +46,9 @@ end function redshift:attach(widget, fun) redshift.update_fun = fun or function() end if not redshift.pid then redshift:start() end - widget:buttons(awful.util.table.join(awful.button({}, 1, function () redshift:toggle() end))) + if widget then + widget:buttons(awful.util.table.join(awful.button({}, 1, function () redshift:toggle() end))) + end end return redshift