Avoid crash if entity not defined.

This commit is contained in:
Pierre-Yves Rollo 2018-12-02 15:22:37 +01:00
parent 6c92826e3c
commit ab5a510775

View File

@ -117,6 +117,10 @@ end
--- Entity update --- Entity update
function update_entity(entity) function update_entity(entity)
if not entity then
return
end
if not entity.nodepos then if not entity.nodepos then
entity.object:remove() -- Remove old/buggy entity entity.object:remove() -- Remove old/buggy entity
return return