summaryrefslogtreecommitdiffstats
path: root/player/lua/osc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'player/lua/osc.lua')
-rw-r--r--player/lua/osc.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index c917289584..df38141707 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -2086,7 +2086,8 @@ function process_event(source, what)
end
--reset active element
- if not (elements[n].eventresponder["reset"] == nil) then
+ if not (n > #elements) and elements[n].eventresponder ~= nil and
+ elements[n].eventresponder["reset"] ~= nil then
elements[n].eventresponder["reset"](elements[n])
end