(svn r10808) -Fix (r10353): Make sure spectators can't open infrastructure building menus.
authormaedhros
Mon, 06 Aug 2007 11:58:15 +0000
changeset 7415 236b512fd8a1
parent 7414 a5959e1de91b
child 7416 cced8adef086
(svn r10808) -Fix (r10353): Make sure spectators can't open infrastructure building menus.
src/vehicle.cpp
--- a/src/vehicle.cpp	Mon Aug 06 06:23:44 2007 +0000
+++ b/src/vehicle.cpp	Mon Aug 06 11:58:15 2007 +0000
@@ -2554,6 +2554,7 @@
 {
 	assert(IsPlayerBuildableVehicleType(type));
 
+	if (!IsValidPlayer(_current_player)) return false;
 	if (_patches.always_build_infrastructure) return true;
 
 	UnitID max;