mirror of https://github.com/OpenTTD/OpenTTD
(svn r23838) -Fix [FS#5000]: assertion got hit when destroing a dock when a ship was loading
parent
60678d9757
commit
f6487875da
|
@ -2555,6 +2555,10 @@ static CommandCost RemoveDock(TileIndex tile, DoCommandFlag flags)
|
||||||
* wander around the world. */
|
* wander around the world. */
|
||||||
Ship *s;
|
Ship *s;
|
||||||
FOR_ALL_SHIPS(s) {
|
FOR_ALL_SHIPS(s) {
|
||||||
|
if (s->current_order.IsType(OT_LOADING) && s->tile == docking_location) {
|
||||||
|
s->LeaveStation();
|
||||||
|
}
|
||||||
|
|
||||||
if (s->dest_tile == docking_location) {
|
if (s->dest_tile == docking_location) {
|
||||||
s->dest_tile = 0;
|
s->dest_tile = 0;
|
||||||
s->current_order.Free();
|
s->current_order.Free();
|
||||||
|
|
Loading…
Reference in New Issue