(svn r7022) -Fix [FS#292]: Properly guard against viewing company-sensitive information from

invalid players (eg spectators) which could lead to crashes.
This commit is contained in:
Darkvater
2006-10-31 21:15:56 +00:00
parent 993cb13c8d
commit eadf788cc5
11 changed files with 35 additions and 28 deletions

View File

@@ -214,7 +214,8 @@ static const WindowDesc _build_docks_toolbar_desc = {
void ShowBuildDocksToolbar(void)
{
if (_current_player == PLAYER_SPECTATOR) return;
if (!IsValidPlayer(_current_player)) return;
DeleteWindowById(WC_BUILD_TOOLBAR, 0);
AllocateWindowDesc(&_build_docks_toolbar_desc);
if (_patches.link_terraform_toolbar) ShowTerraformToolbar();