mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 04:21:07 +01:00
Fix memory leak in mcl_craftguide
This commit is contained in:
parent
d9a8403e11
commit
faafaadc54
1 changed files with 6 additions and 0 deletions
|
@ -530,6 +530,8 @@ mt.register_on_player_receive_fields(function(player, formname, fields)
|
|||
data.pagenum = 1
|
||||
data.iX = data.iX - (fields.size_dec and 1 or -1)
|
||||
craftguide:get_formspec(player_name)
|
||||
elseif (fields.quit) then
|
||||
datas[player_name] = nil
|
||||
else
|
||||
for item in pairs(fields) do
|
||||
if item:find(":") then
|
||||
|
@ -597,3 +599,7 @@ mt.register_on_player_receive_fields(function(player, formname, fields)
|
|||
craftguide:on_use(player)
|
||||
end
|
||||
end)
|
||||
|
||||
mt.register_on_leaveplayer(function(player)
|
||||
datas[player:get_player_name()] = nil
|
||||
end)
|
||||
|
|
Loading…
Reference in a new issue