From 0fd1d34aa5f2a2a01c67ff91b1efff29c858f70b Mon Sep 17 00:00:00 2001 From: cora Date: Sat, 1 Oct 2022 00:31:06 +0200 Subject: [PATCH] Fix possible crash on llama death --- mods/ENTITIES/mcl_entity_invs/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/mods/ENTITIES/mcl_entity_invs/init.lua b/mods/ENTITIES/mcl_entity_invs/init.lua index abd467a71..b60e9c18c 100644 --- a/mods/ENTITIES/mcl_entity_invs/init.lua +++ b/mods/ENTITIES/mcl_entity_invs/init.lua @@ -74,6 +74,7 @@ function mcl_entity_invs.show_inv_form(ent,player,show_name) end local function drop_inv(ent) + if not ent._items then return end local pos = ent.object:get_pos() for i,it in pairs(ent._items) do local p = vector.add(pos,vector.new(math.random() - 0.5, math.random()-0.5, math.random()-0.5))