Skip to content

Commit

Permalink
Fix possible exception when retrieving reminder
Browse files Browse the repository at this point in the history
Fixes #2624
  • Loading branch information
cgx committed Mar 5, 2014
1 parent da208d5 commit 0c99323
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Bug fixes
- fixed unsubscription when renaming an IMAP folder (#2630)
- fixed sorting of events list by calendar name (#2629)
- fixed wrong date format leading to Android email syncing issues (#2609)
- fixed possible exception when retrieving the default event reminder value (#2624)

2.2.0 (2014-02-24)
------------------
Expand Down
9 changes: 6 additions & 3 deletions UI/PreferencesUI/UIxPreferences.m
Original file line number Diff line number Diff line change
Expand Up @@ -571,10 +571,13 @@ - (NSString *) reminder
int index;

value = [userDefaults calendarDefaultReminder];
index = [reminderValues indexOfObject: value];
if (value != nil)
{
index = [reminderValues indexOfObject: value];

if (index != NSNotFound)
return [reminderItems objectAtIndex: index];
if (index != NSNotFound)
return [reminderItems objectAtIndex: index];
}

return @"NONE";
}
Expand Down

0 comments on commit 0c99323

Please sign in to comment.