summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-01-13 21:49:15 +0000
committerrubidium <rubidium@openttd.org>2010-01-13 21:49:15 +0000
commit66b900215a9df9b3ecdaef5f2075049185303215 (patch)
tree59fb1dc66bfce40e994f75b2bc0219b196e20cfb /src
parent7aeccb9bd09c9c0075e777e86e1a44e6bcfa6afc (diff)
downloadopenttd-66b900215a9df9b3ecdaef5f2075049185303215.tar.xz
(svn r18797) -Fix (r18781): building wagons didn't add them to a train
Diffstat (limited to 'src')
-rw-r--r--src/build_vehicle_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index cfb7cd1bf..a0660d4ed 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -1034,7 +1034,7 @@ struct BuildVehicleWindow : Window {
case BUILD_VEHICLE_WIDGET_BUILD: {
EngineID sel_eng = this->sel_engine;
if (sel_eng != INVALID_ENGINE) {
- CommandCallback *callback = (this->vehicle_type == VEH_TRAIN && RailVehInfo(sel_eng)->railveh_type == RAILVEH_WAGON) ? NULL : CcBuildPrimaryVehicle;
+ CommandCallback *callback = (this->vehicle_type == VEH_TRAIN && RailVehInfo(sel_eng)->railveh_type == RAILVEH_WAGON) ? CcBuildWagon : CcBuildPrimaryVehicle;
DoCommandP(this->window_number, sel_eng, 0, GetCmdBuildVeh(this->vehicle_type), callback);
}
break;