mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-10 16:08:13 -06:00
Fix invalid train object reference by validating train is valid before adding it to the list
This commit is contained in:
@@ -61,6 +61,9 @@ function trains_tab.build(map_data, player_data)
|
||||
|
||||
local trains_sorted = {}
|
||||
for id, train in pairs(trains) do
|
||||
if not train.entity.valid then
|
||||
goto continue
|
||||
end
|
||||
if search_network_name then
|
||||
if search_network_name ~= train.network_name then
|
||||
goto continue
|
||||
|
||||
Reference in New Issue
Block a user