Fix possible exception when retrieving reminder

Fixes #2624
This commit is contained in:
Francis Lachapelle
2014-03-05 13:42:38 -05:00
parent da208d5b4a
commit 0c99323db3
2 changed files with 7 additions and 3 deletions
+6 -3
View File
@@ -571,10 +571,13 @@ static NSArray *reminderValues = nil;
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";
}