mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2025-01-25 10:11:32 +01:00
Add secondary existence check after main logic has been executed to prevent future crashes
This commit is contained in:
parent
d5a0fa1c14
commit
7e3b69348e
@ -1101,6 +1101,12 @@ mobs.mob_step = function(self, dtime)
|
||||
end
|
||||
end
|
||||
|
||||
--do not continue if non-existent
|
||||
if not self or not self.object or not self.object:get_luaentity() then
|
||||
self.object:remove()
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
-- can mob be pushed, if so calculate direction -- do this last (overrides everything)
|
||||
if self.pushable then
|
||||
|
Loading…
Reference in New Issue
Block a user