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,7 +196,9 @@ 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]]
|
||||||
handler(unpack(ev.args, 2))
|
if handler then
|
||||||
|
handler(unpack(ev.args, 2))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue