diff --git a/ChangeLog b/ChangeLog index 2a25cd5c7..7c6c7bec8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-01-22 Wolfgang Sourdeau + + * Tools/SOGoToolRestore.m (+initialize): we need to invoke + [iCalEntityObject+SOGo initializeSOGoExtensions], otherwise the + extraction of quick records will cause a crash because some global + variables won't be initialized. + 2010-01-21 Francis Lachapelle * UI/Scheduler/UIxCalListingActions.m diff --git a/SoObjects/Appointments/iCalEntityObject+SOGo.h b/SoObjects/Appointments/iCalEntityObject+SOGo.h index 294b93030..6d52d9e5d 100644 --- a/SoObjects/Appointments/iCalEntityObject+SOGo.h +++ b/SoObjects/Appointments/iCalEntityObject+SOGo.h @@ -27,8 +27,8 @@ @class SOGoUser; -NSCalendarDate *iCalDistantFuture; -NSNumber *iCalDistantFutureNumber; +extern NSCalendarDate *iCalDistantFuture; +extern NSNumber *iCalDistantFutureNumber; @interface iCalEntityObject (SOGoExtensions) diff --git a/SoObjects/Appointments/iCalEntityObject+SOGo.m b/SoObjects/Appointments/iCalEntityObject+SOGo.m index 51705067b..fe5fac74b 100644 --- a/SoObjects/Appointments/iCalEntityObject+SOGo.m +++ b/SoObjects/Appointments/iCalEntityObject+SOGo.m @@ -42,9 +42,12 @@ #import "iCalEntityObject+SOGo.h" +NSCalendarDate *iCalDistantFuture = nil; +NSNumber *iCalDistantFutureNumber = nil; + @implementation iCalEntityObject (SOGoExtensions) -+ (void) initializeSOGoExtensions; ++ (void) initializeSOGoExtensions { if (!iCalDistantFuture) { diff --git a/Tools/SOGoToolRestore.m b/Tools/SOGoToolRestore.m index 1ed2dc26d..e7edaf09f 100644 --- a/Tools/SOGoToolRestore.m +++ b/Tools/SOGoToolRestore.m @@ -33,6 +33,7 @@ #import #import +#import #import #import #import @@ -63,6 +64,8 @@ [bm setBundleSearchPaths: [NSArray arrayWithObject: SOGO_LIBDIR]]; [[bm bundleWithName: @"Appointments" type: @"SOGo"] load]; [[bm bundleWithName: @"Contacts" type: @"SOGo"] load]; + + [iCalEntityObject initializeSOGoExtensions]; } + (NSString *) command