summaryrefslogtreecommitdiff
path: root/src/vehicle_base.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-02-05 15:58:42 +0000
committerrubidium <rubidium@openttd.org>2009-02-05 15:58:42 +0000
commitb7c7a1f70100957232172959ad9e532c5d3237ba (patch)
tree6779dd1fd0dec649bc15425c89520e958d1d25a1 /src/vehicle_base.h
parent324b54132c0e1fc2466d31681b2f3b403f04b69a (diff)
downloadopenttd-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.h2
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.