(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:
@@ -318,7 +318,8 @@ static const WindowDesc _build_road_desc = {
|
||||
|
||||
void ShowBuildRoadToolbar(void)
|
||||
{
|
||||
if (_current_player == PLAYER_SPECTATOR) return;
|
||||
if (!IsValidPlayer(_current_player)) return;
|
||||
|
||||
DeleteWindowById(WC_BUILD_TOOLBAR, 0);
|
||||
AllocateWindowDesc(&_build_road_desc);
|
||||
if (_patches.link_terraform_toolbar) ShowTerraformToolbar();
|
||||
|
Reference in New Issue
Block a user