Fixed an error which issued an exception on startup if a guild is temporary not available

This commit is contained in:
Serraniel 2018-05-24 20:15:39 +02:00
parent 57db3edc8a
commit 2a6f1a49fc

View file

@ -57,7 +57,7 @@ namespace DML.Application
if (cbGuild.Items.Count == 0)
{
Trace("Adding guilds to component...");
cbGuild.Items.AddRange(DMLClient.Client.Guilds.OrderBy(g => g.Name).Select(g => g.Name).ToArray());
cbGuild.Items.AddRange(DMLClient.Client.Guilds.Where(g => g.Name != null).OrderBy(g => g.Name).Select(g => g.Name).ToArray());
cbGuild.SelectedIndex = 0;
Trace("Guild component initialized.");
}