diff --git a/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs b/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs index c6f0d619..623681b6 100644 --- a/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs +++ b/PartyModes/PartyModeChallengeMedley/CPartyModeChallengeMedley.cs @@ -457,7 +457,7 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley public override void LeavingHighscore() { - for (int i = 0; i < CBase.Game.GetNumSongs();i++ ) + for (int i = 0; i < CBase.Game.GetNumSongs(); i++) CBase.Songs.AddPartySongSung(CBase.Game.GetSong(i).ID); _GameData.CurrentRoundNr++; CBase.Graphics.FadeTo(EScreens.ScreenPartyDummy); @@ -588,12 +588,6 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley { CProfile[] profiles = CBase.Profiles.GetProfiles(); - if (profiles == null) - { - _ScreenSongOptions.Selection.TeamNames = new string[] {"foo", "bar"}; - return; - } - if (_GameData.NumPlayerAtOnce < 1 || _GameData.ProfileIDs.Count < _GameData.NumPlayerAtOnce || profiles.Length < _GameData.NumPlayerAtOnce) { _ScreenSongOptions.Selection.TeamNames = new string[] {"foo", "bar"}; diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 5b42d5aa..d7aee117 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -888,7 +888,7 @@ namespace Vocaluxe.Base for (int j = 0; j < CSettings.MaxNumPlayer; j++) { CGame.Players[j].ProfileID = -1; - if (Players[j] == "" || profiles == null) + if (Players[j] == "") continue; foreach (CProfile profile in profiles) diff --git a/Vocaluxe/Base/CProfiles.cs b/Vocaluxe/Base/CProfiles.cs index 8c5c9887..5c05719f 100644 --- a/Vocaluxe/Base/CProfiles.cs +++ b/Vocaluxe/Base/CProfiles.cs @@ -297,7 +297,7 @@ namespace Vocaluxe.Base public static CProfile[] GetProfiles() { if (_Profiles.Count == 0) - return null; + return new CProfile[0]; var list = new List(_Profiles.Values); list.Sort(_CompareByPlayerName);