lua: fix behavior if no script command handler is registered

This commit is contained in:
wm4 2014-02-20 21:09:27 +01:00
parent 98dc8206ae
commit 641fdff65f
1 changed files with 3 additions and 1 deletions

View File

@ -196,7 +196,9 @@ end
local function command_dispatch(ev)
if #ev.args > 0 then
local handler = commands[ev.args[1]]
handler(unpack(ev.args, 2))
if handler then
handler(unpack(ev.args, 2))
end
end
end