mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r26787) -Fix (r20547): Loading a game with order backups leaked Orders and left unreachable items in the pool.
This commit is contained in:
parent
db45d979db
commit
d2ec27c6c4
@ -302,7 +302,12 @@ void Load_BKOR()
|
|||||||
* Furthermore before savegame version 192 the actual content was always corrupt.
|
* Furthermore before savegame version 192 the actual content was always corrupt.
|
||||||
*/
|
*/
|
||||||
if (!_networking || _network_server || IsSavegameVersionBefore(192)) {
|
if (!_networking || _network_server || IsSavegameVersionBefore(192)) {
|
||||||
_order_backup_pool.CleanPool();
|
/* Note: We cannot use CleanPool since that skips part of the destructor
|
||||||
|
* and then leaks un-reachable Orders in the order pool. */
|
||||||
|
OrderBackup *ob;
|
||||||
|
FOR_ALL_ORDER_BACKUPS(ob) {
|
||||||
|
delete ob;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user