From 2e15c455f5175f37b0c2b7e99f73a670bc1bb4b2 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 21 Dec 2009 19:10:18 +0000 Subject: [PATCH] Monotone-Parent: d128523a11c890ea68c1606ab37270a6740d6e8e Monotone-Revision: 730f0c170d5aeba0b485facb0222c81f6499d298 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-12-21T19:10:18 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ SoObjects/SOGo/SOGoUserFolder.m | 10 ++++------ 2 files changed, 10 insertions(+), 6 deletions(-) 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];