Skip to content

Commit

Permalink
Fix: #11329: Don't assert vehicle list length is non-zero when only a…
Browse files Browse the repository at this point in the history
…sked to set string parameter. (#11330)

Since #11321, the vehicle list is not yet initialized when SetStringParameters is called, so a test that the vehicle list size is zero is triggered. However, doing this check in the SetStringParameters function is a bit out of its remit, so just remove it.

(cherry picked from commit 6d675c8)
  • Loading branch information
PeterN authored and JGRennison committed Sep 22, 2023
1 parent 338dff0 commit df7fc5a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/vehicle_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2347,11 +2347,6 @@ struct VehicleListWindow : public BaseVehicleListWindow {
case WID_VL_CAPTION_SHARED_ORDERS: {
switch (this->vli.type) {
case VL_SHARED_ORDERS: // Shared Orders
if (this->vehicles.size() == 0) {
/* We can't open this window without vehicles using this order
* and we should close the window when deleting the order. */
NOT_REACHED();
}
SetDParam(0, this->vehicles.size());
break;

Expand Down

0 comments on commit df7fc5a

Please sign in to comment.