fixed a crash

This commit is contained in:
Monica Moniot
2022-12-01 01:04:55 -05:00
parent a26ed161c6
commit e963ac916c
2 changed files with 1 additions and 3 deletions

View File

@@ -195,8 +195,6 @@ local function send_train_between(map_data, r_station_id, p_station_id, train_id
if depot_id then
map_data.depots[depot_id].available_train_id = nil
train.depot_id = nil
else
local test
end
train.status = STATUS_D_TO_P

View File

@@ -835,7 +835,7 @@ local function on_train_changed(event)
if stop and stop.valid and stop.name == "train-stop" then
if global.stations[stop.unit_number] then
if train then
on_train_arrives_buffer(global, stop, train)
on_train_arrives_buffer(global, stop, train_id, train)
end
else
local depot_id = stop.unit_number--[[@as uint]]