From 08b7340ff5999abfc5508583c36d4ae2381acde9 Mon Sep 17 00:00:00 2001 From: epCode Date: Sat, 10 Apr 2021 10:20:38 -0700 Subject: [PATCH] Fix crash with player near unknown object --- mods/PLAYER/mcl_playerplus/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index a9f6bd5a15..82b681f6df 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -32,8 +32,8 @@ local player_collision = function(player) for _,object in pairs(minetest.get_objects_inside_radius(pos, width)) do - if object:is_player() - or (object:get_luaentity()._cmi_is_mob == true and object ~= player) then + if object and (object:is_player() + or (object:get_luaentity()._cmi_is_mob == true and object ~= player)) then local pos2 = object:get_pos() local vec = {x = pos.x - pos2.x, z = pos.z - pos2.z}