[KOE-151] Fix for exception in Shared Folder dialog if group is synced as contact

This commit is contained in:
Patrick Simpson 2018-02-05 11:15:08 +02:00
parent ab9316ea13
commit ec8ac6de01
1 changed files with 6 additions and 2 deletions

View File

@ -52,8 +52,12 @@ namespace Acacia.UI
_users = new List<GABUser>(); _users = new List<GABUser>();
foreach (IItem item in _gab.Contacts.Items.Sort("FullName", false)) foreach (IItem item in _gab.Contacts.Items.Sort("FullName", false))
{ {
if (item is IContactItem) IContactItem contact = item as IContactItem;
_users.Add(new GABUser((IContactItem)item)); // The check for customer id is to avoid groups created as contacts
if (contact != null && contact.CustomerID != null)
{
_users.Add(new GABUser(contact));
}
} }
} }