Prevent crash when player left

master^2
Casimir 2015-07-30 13:37:33 +02:00
parent 19a4faf09e
commit a136e495e8
1 changed files with 1 additions and 0 deletions

View File

@ -107,6 +107,7 @@ minetest.register_on_joinplayer(function(player)
inventory_plus.inventory[player:get_player_name()] = player:get_inventory_formspec()
end
minetest.after(1,function()
if not player:is_player() then return end
inventory_plus.set_inventory_formspec(player,inventory_plus.get_formspec(player, inventory_plus.default))
end)
end)