mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-12 09:09:09 +00:00
(svn r16056) -Fix (r16037): clicking twice on the "end of orders" crashed.
This commit is contained in:
@@ -876,7 +876,7 @@ public:
|
|||||||
/* Deselect clicked order */
|
/* Deselect clicked order */
|
||||||
this->selected_order = -1;
|
this->selected_order = -1;
|
||||||
} else if (sel == this->selected_order) {
|
} else if (sel == this->selected_order) {
|
||||||
if (this->vehicle->type == VEH_TRAIN) {
|
if (this->vehicle->type == VEH_TRAIN && sel < this->vehicle->GetNumOrders()) {
|
||||||
DoCommandP(this->vehicle->tile, this->vehicle->index + (sel << 16),
|
DoCommandP(this->vehicle->tile, this->vehicle->index + (sel << 16),
|
||||||
MOF_STOP_LOCATION | ((GetVehicleOrder(this->vehicle, sel)->GetStopLocation() + 1) % OSL_END) << 4,
|
MOF_STOP_LOCATION | ((GetVehicleOrder(this->vehicle, sel)->GetStopLocation() + 1) % OSL_END) << 4,
|
||||||
CMD_MODIFY_ORDER | CMD_MSG(STR_8835_CAN_T_MODIFY_THIS_ORDER));
|
CMD_MODIFY_ORDER | CMD_MSG(STR_8835_CAN_T_MODIFY_THIS_ORDER));
|
||||||
|
Reference in New Issue
Block a user