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

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 }