summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script/config.lua24
1 files changed, 14 insertions, 10 deletions
diff --git a/script/config.lua b/script/config.lua
index 107f874b..92ed0491 100644
--- a/script/config.lua
+++ b/script/config.lua
@@ -182,22 +182,26 @@ function m.setConfig(config, other)
local region = ConfigTemplate[c]
if region then
local info = region[k]
- local suc, v = info[2](v)
- if suc then
- m.config[c][k] = v
- else
- m.config[c][k] = info[1]
+ if info then
+ local suc, v = info[2](v)
+ if suc then
+ m.config[c][k] = v
+ else
+ m.config[c][k] = info[1]
+ end
end
end
end
end
for k, v in pairs(other) do
local info = OtherTemplate[k]
- local suc, v = info[2](v)
- if suc then
- m.other[k] = v
- else
- m.other[k] = info[1]
+ if info then
+ local suc, v = info[2](v)
+ if suc then
+ m.other[k] = v
+ else
+ m.other[k] = info[1]
+ end
end
end
log.debug('Config update: ', util.dump(m.config), util.dump(m.other))