diff --git a/timer.lua b/timer.lua index 823433e..6ea3f7b 100644 --- a/timer.lua +++ b/timer.lua @@ -88,7 +88,9 @@ function Timer:every(delay, after, count) end function Timer:cancel(handle) - self.functions[handle] = nil + if handle then + self.functions[handle] = nil + end end function Timer:clear()