(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:
@@ -268,7 +268,7 @@ static const WindowDesc * const _industry_window_desc[2][4] = {
|
||||
|
||||
void ShowBuildIndustryWindow(void)
|
||||
{
|
||||
if (_current_player == PLAYER_SPECTATOR) return;
|
||||
if (!IsValidPlayer(_current_player)) return;
|
||||
AllocateWindowDescFront(_industry_window_desc[_patches.build_rawmaterial_ind][_opt_ptr->landscape],0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user