diff --git a/gate.lua b/gate.lua index 89f7e5b..671d94c 100644 --- a/gate.lua +++ b/gate.lua @@ -1427,7 +1427,7 @@ while true do pcall(function() refreshRemoteLuaVersion(guessBaseFromStatusURL(serverURL)) end) - if type(cfg.force_update) == "boolean" and cfg.force_update == true and versionMismatch == true then + if type(cfg) == "table" and type(cfg.force_update) == "boolean" and cfg.force_update == true and versionMismatch == true then pendingGateUpdate = true end diff --git a/ticketmachine.lua b/ticketmachine.lua index ce9281f..98e07aa 100644 --- a/ticketmachine.lua +++ b/ticketmachine.lua @@ -681,7 +681,7 @@ local function backgroundSyncTask() sleep(UPDATE_CHECK_INTERVAL) pcall(refreshConfigOnce) - if type(CFG.force_update) == 'boolean' and CFG.force_update == true and versionMismatch == true then + if type(cfg) == 'table' and type(cfg.force_update) == 'boolean' and cfg.force_update == true and versionMismatch == true then pendingMachineUpdate = true end end