1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 06:42:03 +00:00

osc: fix last potential race condition on key events

This commit is contained in:
Ricardo Constantino 2017-04-15 17:53:24 +01:00
parent 676570a643
commit 82bf4567f9
No known key found for this signature in database
GPG Key ID: EFD16019AE4FF531

View File

@ -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