From 59e3dcdaad9bf74a564b099824ca71ad8df37659 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sat, 29 Jul 2017 14:51:28 +0100 Subject: [PATCH] add nil check for ent --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 162a4cb..165c158 100644 --- a/init.lua +++ b/init.lua @@ -147,7 +147,7 @@ local apply_shoes = function(name, itemstack, obj, shoes, speed, jump, reverse) local mob = obj.ref local ent = mob:get_luaentity() - if ent.name and ent.name == "mob_horse:horse" then + if ent and ent.name and ent.name == "mob_horse:horse" then if ent.shoed then minetest.add_item(mob:getpos(), ent.shoed)