From f6487875daab0edf09423bd28f87bb008e93ea5c Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 22 Jan 2012 18:16:47 +0000 Subject: (svn r23838) -Fix [FS#5000]: assertion got hit when destroing a dock when a ship was loading --- src/station_cmd.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/station_cmd.cpp') diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index fdf858f8c..2925d5a89 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2555,6 +2555,10 @@ static CommandCost RemoveDock(TileIndex tile, DoCommandFlag flags) * wander around the world. */ Ship *s; FOR_ALL_SHIPS(s) { + if (s->current_order.IsType(OT_LOADING) && s->tile == docking_location) { + s->LeaveStation(); + } + if (s->dest_tile == docking_location) { s->dest_tile = 0; s->current_order.Free(); -- cgit v1.2.3-54-g00ecf