summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-08-23 23:15:04 +0000
committerfrosch <frosch@openttd.org>2008-08-23 23:15:04 +0000
commit13d938ae3d3dcc5fce40ac2cae38a97bd1f20ec8 (patch)
tree6f25eabc7b49b24bccbad181da5b7323e40669d9
parent32e1fd55c551dedba2d8fabd8462ddb0b88a04d0 (diff)
downloadopenttd-13d938ae3d3dcc5fce40ac2cae38a97bd1f20ec8.tar.xz
(svn r14148) -Fix (r14096) [FS#2239]: Orders were freed while they were still shared by other vehicles.
-rw-r--r--src/train_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 344d35981..77d1be499 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -1433,7 +1433,7 @@ CommandCost CmdSellRailWagon(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
first->group_id = DEFAULT_GROUP;
new_f->AddToShared(first);
- first->RemoveFromShared();
+ DeleteVehicleOrders(first);
/* If we deleted a window then open a new one for the 'new' train */
if (IsLocalPlayer() && w != NULL) ShowVehicleViewWindow(new_f);