mirror of
https://github.com/koreader/koreader.git
synced 2025-12-24 12:14:05 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user