diff options
author | cheapie <no-email-for-you@example.com> | 2024-04-22 17:23:03 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2024-04-22 17:23:03 -0500 |
commit | b96d939f9827731cdc2d7cdaf1995f5182e95241 (patch) | |
tree | 33f15143a92936bf0005e4bd5f7523d59caac078 | |
parent | dd123078613eb6a51d62826c746e58cf64241657 (diff) | |
download | celevator-b96d939f9827731cdc2d7cdaf1995f5182e95241.tar celevator-b96d939f9827731cdc2d7cdaf1995f5182e95241.tar.gz celevator-b96d939f9827731cdc2d7cdaf1995f5182e95241.tar.bz2 celevator-b96d939f9827731cdc2d7cdaf1995f5182e95241.tar.xz celevator-b96d939f9827731cdc2d7cdaf1995f5182e95241.zip |
Fix possible crash when removing car
-rw-r--r-- | car.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -668,7 +668,7 @@ minetest.register_on_player_receive_fields(function(_,formname,fields) minetest.remove_node(piecepos) local erefs = minetest.get_objects_inside_radius(piecepos,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 |