diff options
author | wm4 <wm4@nowhere> | 2019-11-29 16:00:21 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-11-29 16:00:21 +0100 |
commit | 1ccb049d3b70e80ee60283b7302297a1fc669090 (patch) | |
tree | 199bfab423e67591f0436393954d6253346100b4 | |
parent | 3f7556baefec810b4bf4a4374b80ae58f53d06f6 (diff) | |
download | mpv-1ccb049d3b70e80ee60283b7302297a1fc669090.tar.bz2 mpv-1ccb049d3b70e80ee60283b7302297a1fc669090.tar.xz |
osc: fix operation when window controls are disabled
It seems this area is simply not defined when window controls are
disabled, so ipairs() will crash on it.
-rw-r--r-- | player/lua/osc.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua index dcdd650313..ee18d0f89f 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -2210,8 +2210,10 @@ function render() for k,cords in pairs(osc_param.areas["showhide"]) do set_virt_mouse_area(cords.x1, cords.y1, cords.x2, cords.y2, "showhide") end - for k,cords in pairs(osc_param.areas["showhide_wc"]) do - set_virt_mouse_area(cords.x1, cords.y1, cords.x2, cords.y2, "showhide_wc") + if osc_param.areas["showhide_wc"] then + for k,cords in pairs(osc_param.areas["showhide_wc"]) do + set_virt_mouse_area(cords.x1, cords.y1, cords.x2, cords.y2, "showhide_wc") + end end do_enable_keybindings() |