From bae190c9bd62b3745c674d7d402b555dec11fb56 Mon Sep 17 00:00:00 2001 From: LoneWolfHT Date: Sun, 15 Oct 2023 12:18:05 -0700 Subject: [PATCH] Fix crash --- mods/ctf/ctf_map/nodes.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mods/ctf/ctf_map/nodes.lua b/mods/ctf/ctf_map/nodes.lua index 7611f3806d..69faf5f496 100644 --- a/mods/ctf/ctf_map/nodes.lua +++ b/mods/ctf/ctf_map/nodes.lua @@ -216,8 +216,10 @@ local chest_def = { local inv = minetest.get_inventory({type = "node", pos = pos}) if not inv or inv:is_empty("main") then - minetest.set_node(pos, {name = "air"}) - minetest.show_formspec(player:get_player_name(), "", player:get_inventory_formspec()) + minetest.close_formspec(player:get_player_name(), "") + minetest.after(0, function() + minetest.set_node(pos, {name = "air"}) + end) end end, on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)