@@ -468,20 +468,23 @@ protected void ApplyPlayerExtraOptions(string sender, string message)
468468 {
469469 var playerExtraOptions = PlayerExtraOptions . FromMessage ( message ) ;
470470
471- if ( playerExtraOptions . IsForceRandomSides != PlayerExtraOptionsPanel . IsForcedRandomSides ( ) )
472- AddPlayerExtraOptionForcedNotice ( playerExtraOptions . IsForceRandomSides , "side selection" . L10N ( "Client:Main:SideAsANoun" ) ) ;
471+ if ( PlayerExtraOptionsPanel != null )
472+ {
473+ if ( playerExtraOptions . IsForceRandomSides != PlayerExtraOptionsPanel . IsForcedRandomSides ( ) )
474+ AddPlayerExtraOptionForcedNotice ( playerExtraOptions . IsForceRandomSides , "side selection" . L10N ( "Client:Main:SideAsANoun" ) ) ;
473475
474- if ( playerExtraOptions . IsForceRandomColors != PlayerExtraOptionsPanel . IsForcedRandomColors ( ) )
475- AddPlayerExtraOptionForcedNotice ( playerExtraOptions . IsForceRandomColors , "color selection" . L10N ( "Client:Main:ColorAsANoun" ) ) ;
476+ if ( playerExtraOptions . IsForceRandomColors != PlayerExtraOptionsPanel . IsForcedRandomColors ( ) )
477+ AddPlayerExtraOptionForcedNotice ( playerExtraOptions . IsForceRandomColors , "color selection" . L10N ( "Client:Main:ColorAsANoun" ) ) ;
476478
477- if ( playerExtraOptions . IsForceRandomStarts != PlayerExtraOptionsPanel . IsForcedRandomStarts ( ) )
478- AddPlayerExtraOptionForcedNotice ( playerExtraOptions . IsForceRandomStarts , "start selection" . L10N ( "Client:Main:StartPositionAsANoun" ) ) ;
479+ if ( playerExtraOptions . IsForceRandomStarts != PlayerExtraOptionsPanel . IsForcedRandomStarts ( ) )
480+ AddPlayerExtraOptionForcedNotice ( playerExtraOptions . IsForceRandomStarts , "start selection" . L10N ( "Client:Main:StartPositionAsANoun" ) ) ;
479481
480- if ( playerExtraOptions . IsForceRandomTeams != PlayerExtraOptionsPanel . IsForcedRandomTeams ( ) )
481- AddPlayerExtraOptionForcedNotice ( playerExtraOptions . IsForceRandomTeams , "team selection" . L10N ( "Client:Main:TeamAsANoun" ) ) ;
482+ if ( playerExtraOptions . IsForceRandomTeams != PlayerExtraOptionsPanel . IsForcedRandomTeams ( ) )
483+ AddPlayerExtraOptionForcedNotice ( playerExtraOptions . IsForceRandomTeams , "team selection" . L10N ( "Client:Main:TeamAsANoun" ) ) ;
482484
483- if ( playerExtraOptions . IsUseTeamStartMappings != PlayerExtraOptionsPanel . IsUseTeamStartMappings ( ) )
484- AddPlayerExtraOptionForcedNotice ( ! playerExtraOptions . IsUseTeamStartMappings , "auto ally" . L10N ( "Client:Main:AutoAllyAsANoun" ) ) ;
485+ if ( playerExtraOptions . IsUseTeamStartMappings != PlayerExtraOptionsPanel . IsUseTeamStartMappings ( ) )
486+ AddPlayerExtraOptionForcedNotice ( ! playerExtraOptions . IsUseTeamStartMappings , "auto ally" . L10N ( "Client:Main:AutoAllyAsANoun" ) ) ;
487+ }
485488
486489 SetPlayerExtraOptions ( playerExtraOptions ) ;
487490 UpdateMapPreviewBoxEnabledStatus ( ) ;
0 commit comments