From 16dd93d3fbb42141e7d24f14b928ba7579980347 Mon Sep 17 00:00:00 2001 From: glx Date: Thu, 10 Feb 2011 15:58:22 +0000 Subject: [PATCH] (svn r22048) -Fix (r4495): company 0 does not always exist, so put temporary vehicles in a valid company --- src/articulated_vehicles.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp index ae6b9d5e6d..95ec4871a0 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;