# HG changeset patch # User frosch # Date 2019-09-29 20:48:19 # Node ID e7d54b77c0540327bd3f3b0d0a6c59a81f3d0b5d # Parent bfeaabaa7b1d853acf7a949b8e3af34a6b89aa98 Fix fbbbc6e1931: Crash when creating orders to stations with relocated station sign. (#7755) Station::xy is the position of the station sign, and not necessarily a tile of the station. diff --git a/src/order_gui.cpp b/src/order_gui.cpp --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -410,8 +410,7 @@ static Order GetOrderCmdFromTile(const V default: NOT_REACHED(); } if (st->facilities & facil) { - StationID st_index = GetStationIndex(st->xy); - order.MakeGoToStation(st_index); + order.MakeGoToStation(st->index); if (_ctrl_pressed) order.SetLoadType(OLF_FULL_LOAD_ANY); if (_settings_client.gui.new_nonstop && v->IsGroundVehicle()) order.SetNonStopType(ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS); order.SetStopLocation(v->type == VEH_TRAIN ? (OrderStopLocation)(_settings_client.gui.stop_location) : OSL_PLATFORM_FAR_END);