2
0
mirror of https://github.com/koreader/koreader synced 2024-11-04 12:00:25 +00:00

configdialog: fix bug with default values (#9662)

This commit is contained in:
hius07 2022-10-21 14:33:07 -04:00 committed by GitHub
parent bb03cf7310
commit 60a16c7e00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -578,7 +578,7 @@ function ConfigOption:init()
end
Notification:setNotifySource(Notification.SOURCE_BOTTOM_MENU_MORE)
local default_value_original
if self.options[c].more_options_param.names then
if self.options[c].more_options_param and self.options[c].more_options_param.names then
local option1 = self.config:findOptionByName(self.options[c].more_options_param.names[1])
local option2 = self.config:findOptionByName(self.options[c].more_options_param.names[2])
default_value_original = { option1.default_value, option2.default_value }