Skip to content

Commit

Permalink
Fixed clock crash
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyschoen committed Jun 14, 2024
1 parent ed038ea commit 22a2823
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions pd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,16 @@ function pd.Clock:destruct()
end

function pd.Clock:dispatch()
local m = self._target[self._method]
if type(m) == "function" then
return m(self._target)
else
self._target:error(
"no method for `" .. self._method ..
"' at clock of Lua object `" .. self._name .. "'"
)
if pd._objects[self._target] then
local m = self._target[self._method]
if type(m) == "function" then
return m(self._target)
else
self._target:error(
"no method for `" .. self._method ..
"' at clock of Lua object `" .. self._name .. "'"
)
end
end
end

Expand Down

0 comments on commit 22a2823

Please sign in to comment.