summaryrefslogtreecommitdiff
path: root/train_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'train_gui.c')
-rw-r--r--train_gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/train_gui.c b/train_gui.c
index bd7956901..3c00d0d6e 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -412,8 +412,8 @@ static void GenerateBuildList(EngineID **engines, uint16 *num_engines, EngineID
(*num_engines) = 0;
(*num_wagons) = 0;
- if (engines == NULL) ExtendEngineListSize((const EngineID**)engines, &engine_length, 25);
- if (wagons == NULL) ExtendEngineListSize((const EngineID**)wagons, &wagon_length, 25);
+ if (*engines == NULL) ExtendEngineListSize((const EngineID**)engines, &engine_length, 25);
+ if (*wagons == NULL) ExtendEngineListSize((const EngineID**)wagons, &wagon_length, 25);
for (j = 0; j < NUM_TRAIN_ENGINES; j++) {
EngineID i = GetRailVehAtPosition(j); // XXX Can be removed when the wagon list is also sorted.