summaryrefslogtreecommitdiff
path: root/src/articulated_vehicles.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2011-02-10 15:58:22 +0000
committerglx <glx@openttd.org>2011-02-10 15:58:22 +0000
commit16dd93d3fbb42141e7d24f14b928ba7579980347 (patch)
tree36e5c8884b350b594e766191bd2f6bbbbfd533a8 /src/articulated_vehicles.cpp
parent421ba1c3421d11ea62438c14e47591a3360948d7 (diff)
downloadopenttd-16dd93d3fbb42141e7d24f14b928ba7579980347.tar.xz
(svn r22048) -Fix (r4495): company 0 does not always exist, so put temporary vehicles in a valid company
Diffstat (limited to 'src/articulated_vehicles.cpp')
-rw-r--r--src/articulated_vehicles.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp
index ae6b9d5e6..95ec4871a 100644
--- a/src/articulated_vehicles.cpp
+++ b/src/articulated_vehicles.cpp
@@ -14,6 +14,7 @@
#include "roadveh.h"
#include "vehicle_func.h"
#include "engine_func.h"
+#include "company_func.h"
#include "table/strings.h"
#include "table/sprites.h"
@@ -51,6 +52,7 @@ uint CountArticulatedParts(EngineID engine_type, bool purchase_window)
if (!purchase_window) {
v = new Vehicle();
v->engine_type = engine_type;
+ v->owner = _current_company;
}
uint i;