diff options
author | cheapie <no-email-for-you@example.com> | 2024-04-21 13:35:19 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2024-04-21 13:35:19 -0500 |
commit | d3d844ab3199777db2d748ebdf369259184eedb9 (patch) | |
tree | eb61f1002c0ee26eb88ceafb1080180d61dca891 | |
parent | 881611953862e8b5a0489ea8c31d03ace364d68e (diff) | |
download | celevator-d3d844ab3199777db2d748ebdf369259184eedb9.tar celevator-d3d844ab3199777db2d748ebdf369259184eedb9.tar.gz celevator-d3d844ab3199777db2d748ebdf369259184eedb9.tar.bz2 celevator-d3d844ab3199777db2d748ebdf369259184eedb9.tar.xz celevator-d3d844ab3199777db2d748ebdf369259184eedb9.zip |
Fix possible crash in car top box right-click handling
-rw-r--r-- | car.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -307,7 +307,7 @@ local pieces = { local boxpos = vector.add(pos,vector.new(0,1,0)) local erefs = minetest.get_objects_inside_radius(boxpos,0.5) for _,ref in pairs(erefs) do - if ref:get_luaentity().name == "celevator:car_top_box" then + if ref:get_luaentity() and ref:get_luaentity().name == "celevator:car_top_box" then local state = ref:get_properties().wield_item if state == "celevator:car_top_box_off" then state = "celevator:car_top_box_on" |