From bf80074d98d5399663ffa1034c301f0adf36f583 Mon Sep 17 00:00:00 2001 From: iliekprogrammar Date: Sun, 7 Aug 2022 12:36:53 +0800 Subject: [PATCH] [5.6][mobs] fix unsafe entity handling (unsure) i'm not sure about this one, can't find a suitable test for it. --- mods/ENTITIES/mcl_mobs/api.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index d183d55c7..8cbe9b8ca 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -3617,8 +3617,9 @@ local mob_step = function(self, dtime) check_item_pickup(self) check_aggro(self,dtime) if not self.fire_resistant then - -- ERROR: [#2523] THIS WILL CAUSE INVALID OBJECTREFS mcl_burning.tick(self.object, dtime, self) + -- mcl_burning.tick may remove object immediately + if not self.object:get_pos() then return end end local pos = self.object:get_pos()