diff options
author | yexo <yexo@openttd.org> | 2011-02-10 13:17:24 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2011-02-10 13:17:24 +0000 |
commit | 421ba1c3421d11ea62438c14e47591a3360948d7 (patch) | |
tree | 345cf763b99b49e69aa7695ce3506c0fa2024d14 /src | |
parent | b7713a7e8540aaf8d1181be8535132ba561f4364 (diff) | |
download | openttd-421ba1c3421d11ea62438c14e47591a3360948d7.tar.xz |
(svn r22047) -Fix: selling a vehicle triggered the assert added in r22041
Diffstat (limited to 'src')
-rw-r--r-- | src/order_backup.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/order_backup.cpp b/src/order_backup.cpp index 78091d97b..9632fa3e1 100644 --- a/src/order_backup.cpp +++ b/src/order_backup.cpp @@ -111,7 +111,9 @@ void OrderBackup::DoRestore(Vehicle *v) FOR_ALL_ORDER_BACKUPS(ob) { if (ob->user == user) delete ob; } - new OrderBackup(v, user); + if (OrderBackup::CanAllocateItem()) { + new OrderBackup(v, user); + } } /** |