]> git.lizzy.rs Git - minetest.git/commitdiff
Fix crash in tab_online when cURL is disabled
authorrubenwardy <rw@rubenwardy.com>
Tue, 9 Feb 2021 12:39:36 +0000 (12:39 +0000)
committerrubenwardy <rw@rubenwardy.com>
Tue, 9 Feb 2021 12:41:11 +0000 (12:41 +0000)
builtin/mainmenu/serverlistmgr.lua

index d98736e54d71bc220626deff553625cf4fb07d44..9876d8ac5309d6803f50a20d8a8523b1b825a796 100644 (file)
@@ -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