summaryrefslogtreecommitdiff
path: root/vehicle_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'vehicle_gui.c')
-rw-r--r--vehicle_gui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vehicle_gui.c b/vehicle_gui.c
index 830a6bb46..62d720061 100644
--- a/vehicle_gui.c
+++ b/vehicle_gui.c
@@ -79,7 +79,7 @@ void BuildVehicleList(vehiclelist_d *vl, int type, int owner, int station)
if (!(vl->flags & VL_REBUILD)) return;
/* Create array for sorting */
- _vehicle_sort = realloc(_vehicle_sort, _vehicles_size * sizeof(_vehicle_sort[0]));
+ _vehicle_sort = realloc(_vehicle_sort, GetVehiclePoolSize() * sizeof(_vehicle_sort[0]));
if (_vehicle_sort == NULL)
error("Could not allocate memory for the vehicle-sorting-list");