mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-08 11:30:21 +01:00
fix crash if not player
This commit is contained in:
parent
399ece08b6
commit
e447b010ce
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user