Dispatcher: nil guard against access to a document instance (#7389)

Also:
* Properly update *all* the touch zones when rotating the FM
* Unbreak (Reader) rotation labels in Dispatcher
Regression since #7306
This commit is contained in:
NiLuJe
2021-03-06 19:27:23 +01:00
committed by GitHub
parent b75ea3da03
commit 32b070f3ac
4 changed files with 14 additions and 8 deletions

View File

@@ -623,14 +623,14 @@ function Dispatcher:execute(ui, settings, gesture)
local arg = v ~= 0 and v or gesture or 0
ui:handleEvent(Event:new(settingsList[k].event, arg))
end
if settingsList[k].configurable ~= nil then
local value = v
if type(v) ~= "number" then
for i, r in ipairs(settingsList[k].args) do
if ui.document and settingsList[k].configurable then
local value = v
if type(v) ~= "number" then
for i, r in ipairs(settingsList[k].args) do
if v == r then value = settingsList[k].configurable.values[i] break end
end
end
ui.document.configurable[settingsList[k].configurable.name] = value
end
end
ui.document.configurable[settingsList[k].configurable.name] = value
end
end
end