diff options
author | rubidium <rubidium@openttd.org> | 2009-02-05 15:58:42 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-02-05 15:58:42 +0000 |
commit | b7c7a1f70100957232172959ad9e532c5d3237ba (patch) | |
tree | 6779dd1fd0dec649bc15425c89520e958d1d25a1 /src/vehicle_base.h | |
parent | 324b54132c0e1fc2466d31681b2f3b403f04b69a (diff) | |
download | openttd-b7c7a1f70100957232172959ad9e532c5d3237ba.tar.xz |
(svn r15354) -Fix (r14803): first shared of a vehicle could be NULL making it impossible to (share-)clone the vehicle.
Diffstat (limited to 'src/vehicle_base.h')
-rw-r--r-- | src/vehicle_base.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicle_base.h b/src/vehicle_base.h index cfda648ec..fff20de4f 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -515,7 +515,7 @@ public: * Get the first vehicle of this vehicle chain. * @return the first vehicle of the chain. */ - inline Vehicle *FirstShared() const { return (this->orders.list == NULL) ? NULL : this->orders.list->GetFirstSharedVehicle(); } + inline Vehicle *FirstShared() const { return (this->orders.list == NULL) ? this->First() : this->orders.list->GetFirstSharedVehicle(); } /** * Check if we share our orders with another vehicle. |