diff --git a/ChangeLog b/ChangeLog index e54040f76..8e700c087 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * OpenChange/MAPIStoreTasksMessage.m: added a way to get the PidTagBody of a task. This could be generalized eventually with the code in MAPIStoreAppointmentWrapper. + * OpenChange/MAPIStoreMessage.m (-saveMessage): added a safety + check to avoid a crash when first accepting invitations on + a newly created profile. 2012-09-07 Francis Lachapelle diff --git a/OpenChange/MAPIStoreMessage.m b/OpenChange/MAPIStoreMessage.m index 325757b81..d6ddf20b5 100644 --- a/OpenChange/MAPIStoreMessage.m +++ b/OpenChange/MAPIStoreMessage.m @@ -541,8 +541,16 @@ rtf2html (NSData *compressedRTF) { /* table modified */ for (count = 0; count < max; count++) - [[containerTables objectAtIndex: count] - notifyChangesForChild: self]; + { + id table; + + table = [containerTables objectAtIndex: count]; + + /* Safety check here as we could have MAPIStorePermissionsTable instances + in our containerTables array. This code might need to be reworked later */ + if ([table respondsToSelector: @selector(notifyChangesForChild:)]) + [table notifyChangesForChild: self]; + } [container cleanupCaches]; } [self setIsNew: NO];