From 26ccf93dd964e7488332d6899af33e6bc88f1346 Mon Sep 17 00:00:00 2001 From: yexo Date: Thu, 10 Feb 2011 13:17:24 +0000 Subject: [PATCH] (svn r22047) -Fix: selling a vehicle triggered the assert added in r22041 --- src/order_backup.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/order_backup.cpp b/src/order_backup.cpp index 78091d97bf..9632fa3e19 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); + } } /**