diff options
author | rubenwardy <rw@rubenwardy.com> | 2021-02-09 12:39:36 +0000 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2021-02-09 12:41:11 +0000 |
commit | b28749057a614075c1f9ba3f96bb86a6e248a210 (patch) | |
tree | 7689452ffd1da0090b96f61e242d9412f13e720a /builtin | |
parent | 1d64e6537c3fb048e0d0594680d1c727a80c30d8 (diff) | |
download | minetest-b28749057a614075c1f9ba3f96bb86a6e248a210.tar.gz minetest-b28749057a614075c1f9ba3f96bb86a6e248a210.tar.bz2 minetest-b28749057a614075c1f9ba3f96bb86a6e248a210.zip |
Fix crash in tab_online when cURL is disabled
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/mainmenu/serverlistmgr.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/builtin/mainmenu/serverlistmgr.lua b/builtin/mainmenu/serverlistmgr.lua index d98736e54..9876d8ac5 100644 --- a/builtin/mainmenu/serverlistmgr.lua +++ b/builtin/mainmenu/serverlistmgr.lua @@ -47,6 +47,15 @@ function serverlistmgr.sync() }} 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 return end |