summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-08-06 11:58:15 +0000
committermaedhros <maedhros@openttd.org>2007-08-06 11:58:15 +0000
commit537064d010891fe7a0e1bdd34af15560cb0154c5 (patch)
treefc744b176f25e0066180e9db19faf062a4d7808c /src/vehicle.cpp
parent51f773bd16451efb9e3c00cf72b20b493bcc8cc6 (diff)
downloadopenttd-537064d010891fe7a0e1bdd34af15560cb0154c5.tar.xz
(svn r10808) -Fix (r10353): Make sure spectators can't open infrastructure building menus.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 78b857c35..4ba949f39 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -2554,6 +2554,7 @@ bool CanBuildVehicleInfrastructure(VehicleType type)
{
assert(IsPlayerBuildableVehicleType(type));
+ if (!IsValidPlayer(_current_player)) return false;
if (_patches.always_build_infrastructure) return true;
UnitID max;