mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r11275) -Fix: oldloader crashing when referencing a vehicle that is not yet loaded.
This commit is contained in:
parent
ebfc4b2842
commit
4f512a70c3
@ -1231,7 +1231,7 @@ bool LoadOldVehicle(LoadgameState *ls, int num)
|
||||
default: v->spritenum >>= 1; break;
|
||||
}
|
||||
|
||||
if (_old_next_ptr != 0xFFFF) v->next = GetVehicle(_old_next_ptr);
|
||||
if (_old_next_ptr != 0xFFFF) v->next = GetVehiclePoolSize() <= _old_next_ptr ? new (_old_next_ptr) InvalidVehicle() : GetVehicle(_old_next_ptr);
|
||||
|
||||
v->string_id = RemapOldStringID(_old_string_id);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user