init: never pass nil into awful.widget widgets

This commit is contained in:
Adrian C. (anrxc) 2010-03-07 21:43:18 +01:00
parent 6f79227ca1
commit fa40e402a7
1 changed files with 2 additions and 2 deletions

View File

@ -114,9 +114,9 @@ local function update(widget, reg, disablecache)
end
if widget.add_value ~= nil then
widget:add_value(tonumber(data) / 100)
widget:add_value(data and tonumber(data) / 100)
elseif widget.set_value ~= nil then
widget:set_value(tonumber(data) / 100)
widget:set_value(data and tonumber(data) / 100)
else
widget.text = data
end