awful.hooks: disallow 0 timer value
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
bd6e568083
commit
f24ddbd159
|
@ -54,7 +54,7 @@ for name, hook in pairs(capi.hooks) do
|
||||||
_M[name] = {}
|
_M[name] = {}
|
||||||
if name == 'timer' then
|
if name == 'timer' then
|
||||||
_M[name].register = function (time, f, runnow)
|
_M[name].register = function (time, f, runnow)
|
||||||
if type(time) ~= 'number' or type(f) ~= 'function' or time < 0 then
|
if type(time) ~= 'number' or type(f) ~= 'function' or time <= 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local new_timer
|
local new_timer
|
||||||
|
|
Loading…
Reference in New Issue