From 50a2cd899425496df787cff881a51389346004f5 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Mon, 8 Nov 2010 16:49:52 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: 54b01b70fe55f24f29ed00a93826637acb076c5f Monotone-Revision: b35d04c6cd2614e48feea1b1dacb0a61aa27fe44 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2010-11-08T16:49:52 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ SOPE/GDLContentStore/GCSAlarmsFolder.m | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index dd7064e81..7b9d7666f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-11-08 Ludovic Marcotte + + * SOPE/GDLContentStore/GCSAlarmsFolder.m + We now check for non-nil values before calling + -timeInterval... + 2010-11-08 Francis Lachapelle * UI/WebServerResources/SOGoDragHandles.js (adjust): for vertical diff --git a/SOPE/GDLContentStore/GCSAlarmsFolder.m b/SOPE/GDLContentStore/GCSAlarmsFolder.m index 69c358840..be86a18b2 100644 --- a/SOPE/GDLContentStore/GCSAlarmsFolder.m +++ b/SOPE/GDLContentStore/GCSAlarmsFolder.m @@ -326,8 +326,10 @@ static NSString *alarmsFolderURLString = nil; { NSNumber *tRecId, *tADate; - tRecId = [NSNumber numberWithInt: (int) [recId timeIntervalSince1970]]; - tADate = [NSNumber numberWithInt: (int) [alarmDate timeIntervalSince1970]]; + // We check if recId and alarmDate are nil prior calling -timeIntervalSince1970 + // Weird gcc optimizations can cause issue here. + tRecId = [NSNumber numberWithInt: (recId ? (int)[recId timeIntervalSince1970] : 0)]; + tADate = [NSNumber numberWithInt: (alarmDate ? (int)[alarmDate timeIntervalSince1970] : 0)]; return [NSDictionary dictionaryWithObjectsAndKeys: cname, @"c_name", path, @"c_path",