diff options
author | cheapie <no-email-for-you@example.com> | 2024-04-22 17:55:20 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2024-04-22 17:55:20 -0500 |
commit | e29d179464abfda76d437b4dc03c57161dca40b0 (patch) | |
tree | c96c647abb583b4aecad9e97a6472d26b0d8211a /car.lua | |
parent | fb49406dd5f3a49dcced3891164240a679948dcc (diff) | |
download | celevator-e29d179464abfda76d437b4dc03c57161dca40b0.tar celevator-e29d179464abfda76d437b4dc03c57161dca40b0.tar.gz celevator-e29d179464abfda76d437b4dc03c57161dca40b0.tar.bz2 celevator-e29d179464abfda76d437b4dc03c57161dca40b0.tar.xz celevator-e29d179464abfda76d437b4dc03c57161dca40b0.zip |
Prevent crashing when minetest.get_objects_inside_radius() returns garbage
Diffstat (limited to 'car.lua')
-rw-r--r-- | car.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -679,7 +679,7 @@ minetest.register_on_player_receive_fields(function(_,formname,fields) local cartopboxpos = vector.add(rootpos,vector.rotate_around_axis(vector.new(0,3,1),vector.new(0,1,0),rootdir)) local erefs = minetest.get_objects_inside_radius(cartopboxpos,0.5) for _,ref in pairs(erefs) do - if toberemoved[ref:get_luaentity().name] then + if ref:get_luaentity() and toberemoved[ref:get_luaentity().name] then ref:remove() end end |