Make GetProfiles return an empty array in case of no profiles
This commit is contained in:
1 parent
e66d108df0
commit
774035e886
3 files changed
+3
-9
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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<CProfile>(_Profiles.Values);
|
||||
list.Sort(_CompareByPlayerName);
|
||||
|
||||
Reference in new issue
Block a user