Fix serverlist issues from previous commit.
Was referencing a 'global' variable so a simple check will do.
This commit is contained in:
parent
07a2995285
commit
7a7f63586f
|
@ -11,9 +11,9 @@ function ServerList.init()
|
|||
serverListWindow = g_ui.displayUI('serverlist')
|
||||
serverTextList = serverListWindow:getChildById('serverList')
|
||||
|
||||
local serverSettings = g_settings.getNode('ServerList')
|
||||
if serverSettings then
|
||||
ServerList.load(serverSettings)
|
||||
servers = g_settings.getNode('ServerList') or {}
|
||||
if servers then
|
||||
ServerList.load()
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -25,8 +25,8 @@ function ServerList.terminate()
|
|||
ServerList = nil
|
||||
end
|
||||
|
||||
function ServerList.load(serverSettings)
|
||||
for host, server in pairs(serverSettings) do
|
||||
function ServerList.load()
|
||||
for host, server in pairs(servers) do
|
||||
ServerList.add(host, server.port, server.protocol, true)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue