From 8c0be66f16f2db4d50b2d3060a6b2cb32f89d746 Mon Sep 17 00:00:00 2001 From: Juraj Vajda Date: Mon, 20 Feb 2023 17:11:12 -0500 Subject: [PATCH] Add check for nil player for skybox update --- skybox.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/skybox.lua b/skybox.lua index 4589080..b98abe9 100644 --- a/skybox.lua +++ b/skybox.lua @@ -23,8 +23,12 @@ minetest.register_globalstep(function(dtime) timer = timer + dtime - if timer > 5 then + if timer > 5 and #players > 0 then for _, player in ipairs(players) do + if not player then + return + end + local player_meta = player:get_meta() local player_pos = player:get_pos() local biome_data = minetest.get_biome_data(player_pos)