Ignore settings for unknown modules

This commit is contained in:
Timo Smit 2019-02-11 12:47:31 +01:00
parent 4d5e69d785
commit 9c799b8f4d

View file

@ -151,7 +151,7 @@ function settings.load()
local fileTable = toml.parse(fileString) local fileTable = toml.parse(fileString)
for module, settings in pairs(fileTable) do for module, settings in pairs(fileTable) do
for setting, value in pairs(settings) do for setting, value in pairs(settings) do
if cfgStructure[module][setting] then if cfgStructure[module] and cfgStructure[module][setting] then
data[cfgStructure[module][setting]] = value data[cfgStructure[module][setting]] = value
end end
end end