forked from mtcontrib/invtweak
Fixed crash when player leave during the join server
This commit is contained in:
parent
54ffc6b3b9
commit
5dadd5c2c3
@ -1,6 +1,6 @@
|
||||
Minetest mod "Inventory Tweaks"
|
||||
===============================
|
||||
version: 2.0
|
||||
version: 2.0.1
|
||||
|
||||
License of source code: WTFPL
|
||||
-----------------------------
|
||||
|
3
init.lua
3
init.lua
@ -34,6 +34,9 @@ local function add_buttons(player, formspec)
|
||||
formspec = player:get_inventory_formspec()
|
||||
end
|
||||
local w,h = get_formspec_size(formspec)
|
||||
if not w or not h then
|
||||
return
|
||||
end
|
||||
for i=1,#tweak.buttons do
|
||||
formspec = formspec .. "button["..w-2+(i*0.5)..",-0.2;" .. tweak.buttons[i]
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user