diff --git a/ChangeLog b/ChangeLog index b12f27ae5..649e17f27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-12-21 Wolfgang Sourdeau + + * SoObjects/SOGo/SOGoUserFolder.m (-fetchContentObjectNames): + fixed a potential crash by removing the "static" attribute of the + "cos" local variable. + 2009-12-19 Ludovic Marcotte * SoObjects/Appointments/SOGoUserFolder+Appointments.m diff --git a/SoObjects/SOGo/SOGoUserFolder.m b/SoObjects/SOGo/SOGoUserFolder.m index f8dccf6ee..b3427772e 100644 --- a/SoObjects/SOGo/SOGoUserFolder.m +++ b/SoObjects/SOGo/SOGoUserFolder.m @@ -603,16 +603,14 @@ { SOGoSystemDefaults *sd; SOGoUser *currentUser; - static NSArray *cos = nil; + NSArray *cos; sd = [SOGoSystemDefaults sharedSystemDefaults]; currentUser = [context activeUser]; - if ((![[context request] isSoWebDAVRequest] || [sd isCalendarDAVAccessEnabled]) + if ((![[context request] isSoWebDAVRequest] + || [sd isCalendarDAVAccessEnabled]) && [currentUser canAccessModule: @"Calendar"]) - { - if (!cos) - cos = [[NSArray alloc] initWithObjects: @"freebusy.ifb", nil]; - } + cos = [NSArray arrayWithObject: @"freebusy.ifb"]; else cos = [NSArray array];