diff options
author | Ricardo Constantino <wiiaboo@gmail.com> | 2017-04-15 17:53:24 +0100 |
---|---|---|
committer | Ricardo Constantino <wiiaboo@gmail.com> | 2017-04-19 20:18:15 +0100 |
commit | 82bf4567f9da29f476a4706850aebdb69f122db6 (patch) | |
tree | ee3447354eaf70f95823adda73b0f9af174f284c /player/lua/osc.lua | |
parent | 676570a6435ef7bcec9c37332155b0c3b0080e0f (diff) | |
download | mpv-82bf4567f9da29f476a4706850aebdb69f122db6.tar.bz2 mpv-82bf4567f9da29f476a4706850aebdb69f122db6.tar.xz |
osc: fix last potential race condition on key events
Diffstat (limited to 'player/lua/osc.lua')
-rw-r--r-- | player/lua/osc.lua | 3 |
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 |