Fix crash in tab_online when cURL is disabled

This commit is contained in:
rubenwardy 2021-02-09 12:39:36 +00:00 committed by Nils Dagsson Moskopp
parent c0bab6cf40
commit cacef5ad3a
Signed by: erle
GPG Key ID: A3BC671C35191080
1 changed files with 9 additions and 0 deletions

View File

@ -47,6 +47,15 @@ function serverlistmgr.sync()
}} }}
end end
local serverlist_url = core.settings:get("serverlist_url") or ""
if not core.get_http_api or serverlist_url == "" then
serverlistmgr.servers = {{
name = fgettext("Public server list is disabled"),
description = ""
}}
return
end
if public_downloading then if public_downloading then
return return
end end