# HG changeset patch # User smatz # Date 1213199815 0 # Node ID cafcf9e8dbdf93686570e074ee7b07359d357c3a # Parent dc3c14edbc620063fafd35fd98f88c1c8a25c96a (svn r13475) -Fix (r13464): crash on destroying aquaduct with ship on in and on company bankrupt diff -r dc3c14edbc62 -r cafcf9e8dbdf src/tunnelbridge_cmd.cpp --- a/src/tunnelbridge_cmd.cpp Wed Jun 11 15:08:52 2008 +0000 +++ b/src/tunnelbridge_cmd.cpp Wed Jun 11 15:56:55 2008 +0000 @@ -1268,9 +1268,9 @@ if (CmdFailed(DoCommand(tile, 0, 0, DC_EXEC | DC_BANKRUPT, CMD_LANDSCAPE_CLEAR))) { /* When clearing the bridge/tunnel failed there are still vehicles on/in * the bridge/tunnel. As all *our* vehicles are already removed, they - * must be of another owner. Therefor this must be a road bridge/tunnel. + * must be of another owner. Therefore this can't be rail tunnel/bridge. * In that case we can safely reassign the ownership to OWNER_NONE. */ - assert(GetTunnelBridgeTransportType(tile) == TRANSPORT_ROAD); + assert(GetTunnelBridgeTransportType(tile) != TRANSPORT_RAIL); SetTileOwner(tile, OWNER_NONE); } } diff -r dc3c14edbc62 -r cafcf9e8dbdf src/vehicle.cpp --- a/src/vehicle.cpp Wed Jun 11 15:08:52 2008 +0000 +++ b/src/vehicle.cpp Wed Jun 11 15:56:55 2008 +0000 @@ -206,7 +206,7 @@ /** Procedure called for every vehicle found in tunnel/bridge in the hash map */ static void *GetVehicleTunnelBridgeProc(Vehicle *v, void *data) { - if (v->type != VEH_TRAIN && v->type != VEH_ROAD) return NULL; + if (v->type != VEH_TRAIN && v->type != VEH_ROAD && v->type != VEH_SHIP) return NULL; _error_message = VehicleInTheWayErrMsg(v); return v;