From eadf788cc5d068622f20221566f4027625090689 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Tue, 31 Oct 2006 21:15:56 +0000 Subject: (svn r7022) -Fix [FS#292]: Properly guard against viewing company-sensitive information from invalid players (eg spectators) which could lead to crashes. --- rail_gui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rail_gui.c') diff --git a/rail_gui.c b/rail_gui.c index 60fcdafb9..bf8fb3bcc 100644 --- a/rail_gui.c +++ b/rail_gui.c @@ -589,7 +589,7 @@ void ShowBuildRailToolbar(RailType railtype, int button) { Window *w; - if (_current_player == PLAYER_SPECTATOR) return; + if (!IsValidPlayer(_current_player)) return; if (!ValParamRailtype(railtype)) return; // don't recreate the window if we're clicking on a button and the window exists. -- cgit v1.2.3-54-g00ecf