From a105e3bd6054b2d6817e37018e17d6b1fa6e0ecb Mon Sep 17 00:00:00 2001 From: teejusb <5017202+teejusb@users.noreply.github.com> Date: Fri, 24 Sep 2021 14:41:56 -0700 Subject: [PATCH] Verify that PrefsTable[name] exists before indexing the pref. --- Themes/_fallback/Scripts/02 ThemePrefs.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Themes/_fallback/Scripts/02 ThemePrefs.lua b/Themes/_fallback/Scripts/02 ThemePrefs.lua index 55bb07791c..2bc5b86cfb 100644 --- a/Themes/_fallback/Scripts/02 ThemePrefs.lua +++ b/Themes/_fallback/Scripts/02 ThemePrefs.lua @@ -62,11 +62,14 @@ end local function ResolveTable( pref ) -- check the section for this theme local name = GetThemeName() - local val = PrefsTable[name][pref] - - if val ~= nil then - --Trace( ("ResolveTable(%s): found in %s"):format(pref,name) ) - return PrefsTable[name] + local val = nil + + if PrefsTable[name] then + val = PrefsTable[name][pref] + if val ~= nil then + --Trace( ("ResolveTable(%s): found in %s"):format(pref,name) ) + return PrefsTable[name] + end end -- not in the current theme; check the fallback if it exists