1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-24 17:50:37 +01:00

fix crash if not player

This commit is contained in:
crabman77 2015-08-10 23:52:20 +02:00
parent 399ece08b6
commit e447b010ce

View File

@ -95,6 +95,7 @@ local function tick()
minetest.after(1, tick)
for playername,hudids in pairs(inventory_icon.hudids) do
local player = minetest.get_player_by_name(playername)
if player then
local occupied, size = inventory_icon.get_inventory_state(player:get_inventory(), "main")
local icon, color
if occupied >= size then
@ -131,6 +132,7 @@ local function tick()
end
end
end
end
end
tick()