mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r14148) -Fix (r14096) [FS#2239]: Orders were freed while they were still shared by other vehicles.
This commit is contained in:
parent
464899f9ad
commit
b66b3937ed
@ -1433,7 +1433,7 @@ CommandCost CmdSellRailWagon(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
|||||||
first->group_id = DEFAULT_GROUP;
|
first->group_id = DEFAULT_GROUP;
|
||||||
|
|
||||||
new_f->AddToShared(first);
|
new_f->AddToShared(first);
|
||||||
first->RemoveFromShared();
|
DeleteVehicleOrders(first);
|
||||||
|
|
||||||
/* If we deleted a window then open a new one for the 'new' train */
|
/* If we deleted a window then open a new one for the 'new' train */
|
||||||
if (IsLocalPlayer() && w != NULL) ShowVehicleViewWindow(new_f);
|
if (IsLocalPlayer() && w != NULL) ShowVehicleViewWindow(new_f);
|
||||||
|
Loading…
Reference in New Issue
Block a user