Fix crash when player leaves the server

This commit is contained in:
cora 2023-08-25 02:12:20 +02:00
parent 0aa2d90f7d
commit a1f99570b4

View File

@ -59,7 +59,7 @@ minetest.register_globalstep(function(dtime)
end)
minetest.register_on_leaveplayer(function(pl)
for h,v in pairs(placed_lights[pl]) do
for h,v in pairs(placed_lights[pl] or {}) do
minetest.remove_node(v)
end
placed_lights[pl] = nil