Add check for nil player for skybox update

This commit is contained in:
Juraj Vajda 2023-02-20 18:16:53 -05:00
parent 8c0be66f16
commit 4362112b8c

View File

@ -19,11 +19,10 @@
local timer = 0
minetest.register_globalstep(function(dtime)
local players = minetest.get_connected_players()
timer = timer + dtime
if timer > 5 then
local players = minetest.get_connected_players()
if timer > 5 and #players > 0 then
for _, player in ipairs(players) do
if not player then
return