From 5027aabc1b0adbba6ed3177a7bc833dc7d5da352 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 26 Oct 2016 15:42:50 -0400 Subject: [PATCH] Improve validation of mail account delegators --- SoObjects/Mailer/SOGoMailAccount.m | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/SoObjects/Mailer/SOGoMailAccount.m b/SoObjects/Mailer/SOGoMailAccount.m index 4b19c6c23..4e74932ff 100644 --- a/SoObjects/Mailer/SOGoMailAccount.m +++ b/SoObjects/Mailer/SOGoMailAccount.m @@ -1059,11 +1059,9 @@ static NSString *inboxFolderName = @"INBOX"; { currentDelegate = [oldDelegates objectAtIndex: count]; delegateUser = [SOGoUser userWithLogin: currentDelegate]; + [delegates removeObject: currentDelegate]; if (delegateUser) - { - [delegates removeObject: currentDelegate]; - [delegateUser removeMailDelegator: owner]; - } + [delegateUser removeMailDelegator: owner]; } [self _setDelegates: delegates];