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.
This commit is contained in:
wm4 2019-11-29 16:00:21 +01:00
parent 3f7556baef
commit 1ccb049d3b
1 changed files with 4 additions and 2 deletions

View File

@ -2210,8 +2210,10 @@ function render()
for k,cords in pairs(osc_param.areas["showhide"]) do for k,cords in pairs(osc_param.areas["showhide"]) do
set_virt_mouse_area(cords.x1, cords.y1, cords.x2, cords.y2, "showhide") set_virt_mouse_area(cords.x1, cords.y1, cords.x2, cords.y2, "showhide")
end end
for k,cords in pairs(osc_param.areas["showhide_wc"]) do if osc_param.areas["showhide_wc"] then
set_virt_mouse_area(cords.x1, cords.y1, cords.x2, cords.y2, "showhide_wc") 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 end
do_enable_keybindings() do_enable_keybindings()