From df7fc5a79a305e872377267fc42f2f3a26de3962 Mon Sep 17 00:00:00 2001 From: PeterN Date: Thu, 21 Sep 2023 13:24:53 +0100 Subject: [PATCH] Fix: #11329: Don't assert vehicle list length is non-zero when only asked 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 6d675c8acfe7f854a740118c1aba300b107007b5) --- src/vehicle_gui.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index f71b5c29f31..da07b4aa824 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -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;