Avoid crashes on broken configurations

This commit is contained in:
Ludovic Marcotte
2014-01-21 16:40:57 -05:00
parent 3090448fcb
commit 762b841249

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}>"];