From 07d237ce15a5739e2a53b5a7d2aa0693f3987728 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 18 Feb 2017 02:06:21 +0100 Subject: [PATCH] Fix possible crash in mcl_item_entity --- mods/ENTITIES/mcl_item_entity/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index ce693e983..2794bc59c 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -233,7 +233,7 @@ core.register_entity(":__builtin:item", { if item_drop_settings.random_item_velocity == true then minetest.after(0, function() local vel = self.object:getvelocity() - if vel.x == 0 and vel.z == 0 then + if vel and vel.x == 0 and vel.z == 0 then local x = math.random(1, 5) if math.random(1,2) == 1 then x = -x