configdialog: fix bug with default values (#9662)

reviewable/pr9666/r1
hius07 2 years ago committed by GitHub
parent bb03cf7310
commit 60a16c7e00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 }

Loading…
Cancel
Save