diff --git a/mods/default/item_entity.lua b/mods/default/item_entity.lua index c34e60e..53abb95 100644 --- a/mods/default/item_entity.lua +++ b/mods/default/item_entity.lua @@ -15,8 +15,8 @@ local item = { burn_up = function(self) -- disappear in a smoke puff - self.object:remove() local p = self.object:getpos() + self.object:remove() minetest.sound_play("default_item_smoke", { pos = p, max_hear_distance = 8, @@ -48,6 +48,10 @@ local item = { if self.ignite_timer > 10 then self.ignite_timer = 0 + local pos = self.object:get_pos() + if pos == nil then + return -- object already deleted + end local node = minetest.get_node_or_nil(self.object:getpos()) if not node then return