mirror of https://github.com/mpv-player/mpv
lua: fix behavior if no script command handler is registered
This commit is contained in:
parent
98dc8206ae
commit
641fdff65f
|
@ -196,8 +196,10 @@ end
|
||||||
local function command_dispatch(ev)
|
local function command_dispatch(ev)
|
||||||
if #ev.args > 0 then
|
if #ev.args > 0 then
|
||||||
local handler = commands[ev.args[1]]
|
local handler = commands[ev.args[1]]
|
||||||
|
if handler then
|
||||||
handler(unpack(ev.args, 2))
|
handler(unpack(ev.args, 2))
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- used by default event loop (mp_event_loop()) to decide when to quit
|
-- used by default event loop (mp_event_loop()) to decide when to quit
|
||||||
|
|
Loading…
Reference in New Issue