From b7b4cdd2a721787e617762a4a28530be18832cc3 Mon Sep 17 00:00:00 2001 From: poire-z Date: Mon, 25 Mar 2019 19:15:29 +0100 Subject: [PATCH] ConfigDialog: fix possible crash (#4838) When one has set a default for toggles thad don't have 'values' in their definitions (possibly only Orientation). --- frontend/ui/widget/configdialog.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/ui/widget/configdialog.lua b/frontend/ui/widget/configdialog.lua index 9af8fd4be..748476c8b 100644 --- a/frontend/ui/widget/configdialog.lua +++ b/frontend/ui/widget/configdialog.lua @@ -356,7 +356,7 @@ function ConfigOption:init() end local default_option_name = self.config.config_options.prefix.."_"..self.options[c].name local default_value = G_reader_settings:readSetting(default_option_name) - if default_value then + if default_value and self.options[c].values then local val = default_value local min_diff if type(val) == "table" then