LTN Manager crashes if locomotive is destroyed while trying to access it.
Error while running event LtnManager::on_tick (ID 0)
__LtnManager__/scripts/ltn-data.lua:419: attempt to index field 'main_locomotive' (a nil value)
stack traceback:
__LtnManager__/scripts/ltn-data.lua:419: in function 'callback'
__flib__/table.lua:249: in function <__flib__/table.lua:221>
(...tail calls...)
__LtnManager__/scripts/ltn-data.lua:1077: in function 'iterate'
__LtnManager__/control.lua:212: in function <__LtnManager__/control.lua:197>
1779.064 Error ServerMultiplayerManager.cpp:92: MultiplayerManager failed: "The mod LTN Manager (0.4.12) caused a non-recoverable error.
Please report this error to the mod author.
A simple fix should be to just check the field for nil before access.
Describe the Bug
LTN Manager crashes if locomotive is destroyed while trying to access it.
A simple fix should be to just check the field for nil before access.