diff options
-rw-r--r-- | drive_entity.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drive_entity.lua b/drive_entity.lua index f3025f6..a9792d8 100644 --- a/drive_entity.lua +++ b/drive_entity.lua @@ -711,7 +711,7 @@ local function updatecarpos(pos) meta:set_string("infotext",string.format("Using car with origin %s",minetest.pos_to_string(carpos))) local carid = meta:get_int("carid") local carinfo = minetest.deserialize(celevator.storage:get_string(string.format("car%d",carid))) - if not carinfo then return end + if not (carinfo and carinfo.controllerpos) then return end carinfo.origin = carpos celevator.storage:set_string(string.format("car%d",carid),minetest.serialize(carinfo)) local drivepos = celevator.controller.finddrive(carinfo.controllerpos) |