Changeset - r27963:438e2b6f1de3
[Not reviewed]
master
0 1 0
PeterN - 15 months ago 2023-09-21 12:24:53
peter1138@openttd.org
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.
1 file changed with 0 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/vehicle_gui.cpp
Show inline comments
 
@@ -1936,11 +1936,6 @@ public:
 
			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;
 

	
0 comments (0 inline, 0 general)