mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
This commit is contained in:
parent
d0c753465d
commit
d5e936c9d4
@ -1166,7 +1166,11 @@ public:
|
|||||||
case WID_O_DEPOT_ACTION: {
|
case WID_O_DEPOT_ACTION: {
|
||||||
VehicleOrderID sel = this->OrderGetSel();
|
VehicleOrderID sel = this->OrderGetSel();
|
||||||
const Order *order = this->vehicle->GetOrder(sel);
|
const Order *order = this->vehicle->GetOrder(sel);
|
||||||
if (order == nullptr || !order->IsType(OT_GOTO_DEPOT)) break;
|
if (order == nullptr || !order->IsType(OT_GOTO_DEPOT)) {
|
||||||
|
/* We can't leave this param unset or the undefined behavior can cause a crash. */
|
||||||
|
SetDParam(0, STR_EMPTY);
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
|
||||||
/* Select the current action selected in the dropdown. The flags don't match the dropdown so we can't just use an index. */
|
/* Select the current action selected in the dropdown. The flags don't match the dropdown so we can't just use an index. */
|
||||||
if (order->GetDepotOrderType() & ODTFB_SERVICE) {
|
if (order->GetDepotOrderType() & ODTFB_SERVICE) {
|
||||||
|
Loading…
Reference in New Issue
Block a user