mirror of https://github.com/OpenTTD/OpenTTD
Fix #8132: Corrupted savegame crashing OpenTTD on load
parent
0ed00ae111
commit
5aa6351042
|
@ -898,6 +898,9 @@ bool AfterLoadGame()
|
||||||
case MP_STATION: {
|
case MP_STATION: {
|
||||||
BaseStation *bst = BaseStation::GetByTile(t);
|
BaseStation *bst = BaseStation::GetByTile(t);
|
||||||
|
|
||||||
|
/* Sanity check */
|
||||||
|
if (bst->owner != GetTileOwner(t)) SlErrorCorrupt("Wrong owner for station tile");
|
||||||
|
|
||||||
/* Set up station spread */
|
/* Set up station spread */
|
||||||
bst->rect.BeforeAddTile(t, StationRect::ADD_FORCE);
|
bst->rect.BeforeAddTile(t, StationRect::ADD_FORCE);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue