summaryrefslogtreecommitdiff
path: root/misc_gui.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-10-31 21:15:56 +0000
committerDarkvater <darkvater@openttd.org>2006-10-31 21:15:56 +0000
commiteadf788cc5d068622f20221566f4027625090689 (patch)
treef1aae895580a4a2bc7864f645fae39e9c2bc7669 /misc_gui.c
parent993cb13c8dde55d77b732bba55bf3c94b0ea9216 (diff)
downloadopenttd-eadf788cc5d068622f20221566f4027625090689.tar.xz
(svn r7022) -Fix [FS#292]: Properly guard against viewing company-sensitive information from
invalid players (eg spectators) which could lead to crashes.
Diffstat (limited to 'misc_gui.c')
-rw-r--r--misc_gui.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/misc_gui.c b/misc_gui.c
index 583f5d571..2db97dac2 100644
--- a/misc_gui.c
+++ b/misc_gui.c
@@ -450,6 +450,7 @@ static const WindowDesc _build_trees_scen_desc = {
void ShowBuildTreesToolbar(void)
{
+ if (!IsValidPlayer(_current_player)) return;
AllocateWindowDescFront(&_build_trees_desc, 0);
}