Avoid crashes on broken configurations

pull/17/head
Ludovic Marcotte 2014-01-21 16:40:57 -05:00
parent 3090448fcb
commit 762b841249
1 changed files with 5 additions and 0 deletions

View File

@ -1034,6 +1034,11 @@
// Recipient is fixed, which is the calendar owner
ownerUser = [SOGoUser userWithLogin: self->owner];
recipientIdentity = [ownerUser primaryIdentity];
// Safety net for broken configurations
if (!recipientIdentity)
return;
recipientEmail = [recipientIdentity objectForKey: @"email"];
fullRecipientEmail = [recipientIdentity keysWithFormat: @"%{fullName} <%{email}>"];