Add secondary existence check after main logic has been executed to prevent future crashes
parent
d5a0fa1c14
commit
7e3b69348e
|
@ -1101,6 +1101,12 @@ mobs.mob_step = function(self, dtime)
|
||||||
end
|
end
|
||||||
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)
|
-- can mob be pushed, if so calculate direction -- do this last (overrides everything)
|
||||||
if self.pushable then
|
if self.pushable then
|
||||||
|
|
Loading…
Reference in New Issue