From c9b456c86d7fe4b9daa05236815cd12262243c78 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Wed, 12 Sep 2012 14:42:24 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: 0be42fb4ac553a3b8b6b1d18144d2c4aa9dfdd0e Monotone-Revision: df3aa42d7aa65c233839e872cc103d9cf8c2d654 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2012-09-12T14:42:24 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 3 +++ OpenChange/MAPIStoreMessage.m | 12 ++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) 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];